Пример #1
0
 def test_pause_resume_helper(self, determine_ports, services):
     f = MagicMock()
     services.return_value = 's1'
     determine_ports.return_value = 'p1'
     with patch.object(nutils, 'assess_status_func') as asf:
         asf.return_value = 'assessor'
         nutils._pause_resume_helper(f, 'some-config')
         asf.assert_called_once_with('some-config')
         # ports=None whilst port checks are disabled.
         f.assert_called_once_with('assessor', services='s1', ports=None)
 def test_pause_resume_helper(self, determine_ports, services):
     f = MagicMock()
     services.return_value = 's1'
     determine_ports.return_value = 'p1'
     with patch.object(nutils, 'assess_status_func') as asf:
         asf.return_value = 'assessor'
         nutils._pause_resume_helper(f, 'some-config')
         asf.assert_called_once_with('some-config')
         # ports=None whilst port checks are disabled.
         f.assert_called_once_with('assessor', services='s1', ports=None)