def test_stage_connect(self): self.device.connect = Mock(side_effect=ConnectionError('negative test')) self.device.destroy_all = Mock(return_value="") # Execute stage: connect with self.assertRaises(AEtestFailedSignal): connect(self.section, self.device)
def test_stage_connect(self): self.device.connect = Mock(return_value=self.raw_output.connect) # Execute stage: connect with self.assertRaises(AEtestPassedSignal): connect(self.section, self.device)