Page MenuHomePhabricator
Paste P17434

(An Untitled Masterwork)
ActivePublic

Authored by jbond on Oct 7 2021, 12:43 PM.
Tags
None
Referenced Files
F34677331: raw-paste-data.txt
Oct 7 2021, 12:48 PM
F34677326: raw-paste-data.txt
Oct 7 2021, 12:48 PM
F34677323: raw-paste-data.txt
Oct 7 2021, 12:47 PM
F34677315: raw-paste-data.txt
Oct 7 2021, 12:43 PM
Subscribers
None
With assert self.mocked_icinga_host.run_sync.assert_not_called()
_________________________________ TestIcingaHosts.test_recheck_failed_services_optimal _________________________________
self = <spicerack.tests.unit.test_icinga.TestIcingaHosts object at 0x7f6db8ad92b0>
def test_recheck_failed_services_optimal(self):
"""It should force a recheck of all services for the hosts on the Icinga server."""
with open(get_fixture_path("icinga", "status_with_services.json")) as f:
set_mocked_icinga_host_output(self.mocked_icinga_host, f.read())
> assert self.mocked_icinga_host.run_sync.assert_not_called()
E AssertionError: assert None
> assert self.mocked_icinga_host.run_sync.assert_not_called()
E AssertionError: assert None
E + where None = <bound method NonCallableMock.assert_not_called of <MagicMock name='mock.run_sync' id='140109226153440'>>()
E + where <bound method NonCallableMock.assert_not_called of <MagicMock name='mock.run_sync' id='140109226153440'>> = <MagicMock name='mock.run_sync' id='140109226153440'>.assert_not_called
E + where <MagicMock name='mock.run_sync' id='140109226153440'> = <MagicMock spec_set='RemoteHosts' id='140109226650592'>.run_sync
E + where <MagicMock spec_set='RemoteHosts' id='140109226650592'> = <spicerack.tests.unit.test_icinga.TestIcingaHosts object at 0x7f6db8ad92b0>.mocked_icinga_host
spicerack/tests/unit/test_icinga.py:412: AssertionError
# with print(self.mocked_icinga_host.run_sync.mock_calls)
_________________________________ TestIcingaHosts.test_recheck_failed_services_optimal _________________________________
self = <spicerack.tests.unit.test_icinga.TestIcingaHosts object at 0x7fafd0bfb220>
def test_recheck_failed_services_optimal(self):
"""It should force a recheck of all services for the hosts on the Icinga server."""
with open(get_fixture_path("icinga", "status_with_services.json")) as f:
set_mocked_icinga_host_output(self.mocked_icinga_host, f.read())
print(self.mocked_icinga_host.run_sync.mock_calls)
> raise RuntimeError
E RuntimeError
spicerack/tests/unit/test_icinga.py:413: RuntimeError
------------------------------------------------- Captured stdout call -------------------------------------------------
[]

Event Timeline

jbond edited the content of this paste. (Show Details)
jbond edited the content of this paste. (Show Details)