MCPcopy Create free account
hub / github.com/CiscoPSIRT/openVulnQuery / test_output_trial

Method test_output_trial

tests/test_utils.py:153–161  ·  view source on GitHub ↗
(self, mock_open)

Source from the content-addressed store, hash-verified

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):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected