MCPcopy
hub / github.com/freedomofpress/dangerzone / assert_mocks

Method assert_mocks

tests/test_cli.py:399–411  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

397 )
398
399 def assert_mocks() -> None:
400 if os.environ.get("DUMMY_CONVERSION") or is_qubes_native_conversion():
401 mock_container_stop.assert_not_called()
402 mock_machine_stop.assert_not_called()
403 return
404
405 mock_container_stop.assert_called_once()
406 if platform.system() != "Linux":
407 mock_machine_stop.assert_called_once()
408 else:
409 mock_machine_stop.assert_not_called()
410 mock_container_stop.reset_mock()
411 mock_machine_stop.reset_mock()
412
413 # The CLI should not linger, so that it can call the shutdown tasks.
414 result = self.run_cli(sample_pdf, tmp_path=tmp_path, linger=False)

Callers

nothing calls this directly

Calls 2

getMethod · 0.80

Tested by

no test coverage detected