def test_get_instance_state_absent(self): with mock.patch('requests.get', self.mockRequestsInternalServerError): self.assertEqual(-1, nifcloud.get_instance_state(self.mockModule))
def test_get_instance_state_present(self): with mock.patch('requests.get', self.mockRequestsGetDescribeInstance): self.assertEqual(16, nifcloud.get_instance_state(self.mockModule))