def test_update_individual_target_observations_for_facility(self): with mock.patch.object(FakeRoboticFacility, 'update_observation_status', return_value='COMPLETED') as uos_mock: FakeRoboticFacility().update_all_observation_statuses( target=self.t1) self.assertEquals(uos_mock.call_count, 2)
def test_observation_detail(self): response = self.client.get( reverse('tom_observations:detail', kwargs={'pk': self.observation_record.id}) ) self.assertEqual(response.status_code, 200) self.assertContains( response, FakeRoboticFacility().get_observation_url(self.observation_record.observation_id) )
def test_update_all_observations_for_facility(self): with mock.patch.object(FakeRoboticFacility, 'update_observation_status') as uos_mock: FakeRoboticFacility().update_all_observation_statuses() self.assertEquals(uos_mock.call_count, 2)