(self, mock_open)
| 151 | |
| 152 | @mock.patch("openVulnQuery.utils.open", create=True) |
| 153 | def test_output_trial(self, mock_open): |
| 154 | filtered_advisories = utils.filter_advisories( |
| 155 | mock_advisories, constants.API_LABELS) |
| 156 | s_rep = json.dumps(filtered_advisories) |
| 157 | mock_open.side_effect = [ |
| 158 | mock.mock_open(read_data=s_rep).return_value, |
| 159 | ] |
| 160 | self.assertIsNone(utils.output( |
| 161 | filtered_advisories, JSON_OUTPUT_FORMAT_TOKEN, mock_open)) |
| 162 | |
| 163 | @mock.patch("openVulnQuery.utils.open", create=True) |
| 164 | def test_output_csv_succeeds(self, mock_open): |
nothing calls this directly
no outgoing calls
no test coverage detected