Пример #1
0
 def test_disconnect_bad_handle(self):
     """Do not attempt to disconnect if the device handle is bad."""
     spec = AvsFiberSpectrograph()
     spec.handle = AvsReturnCode.invalidHandle.value
     spec.disconnect()
     self.patch.return_value.AVS_Deactivate.assert_not_called()
     self.patch.return_value.AVS_Done.assert_called_once_with()
Пример #2
0
 def test_disconnect_no_handle(self):
     """Test that we do not attempt to disconnect if there is no device
     handle.
     """
     spec = AvsFiberSpectrograph()
     spec.handle = None
     spec.disconnect()
     self.patch.return_value.AVS_Deactivate.assert_not_called()
     self.patch.return_value.AVS_Done.assert_called_once_with()