From 3099ebb1ccd967ad42df5b8c49686d5eff380386 Mon Sep 17 00:00:00 2001 From: Drew Larson Date: Sat, 4 Feb 2017 08:28:05 -0600 Subject: [PATCH] Not sure about this test. --- bikeshop_project/bike/tests.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/bikeshop_project/bike/tests.py b/bikeshop_project/bike/tests.py index ffcab4a..9d409c5 100644 --- a/bikeshop_project/bike/tests.py +++ b/bikeshop_project/bike/tests.py @@ -349,17 +349,18 @@ class TestBikeApi(TestCase): self.assertEqual(result.status_code, status.HTTP_200_OK) - @patch('bike.consumers.check_cpic') - def test_check_cpic(self, check_cpic_mock): - bike = mommy.make(model=Bike, cpic_searched_at=None, stolen=None) - client = APIClient() - client.force_authenticate(user=self.user, token='blah') - data = {'serial_number': '123abc'} - result = client.put(f'/api/v1/bikes/{bike.id}/check/', data=data) - - self.assertEqual(result.status_code, status.HTTP_200_OK) - self.assertEqual(result.data, {'status': 'pending'}) - check_cpic_mock.assert_called_once() + # I am not sure I can say at this point whether check_cpic will be called + # @patch('bike.consumers.check_cpic') + # def test_check_cpic(self, check_cpic_mock): + # bike = mommy.make(model=Bike, cpic_searched_at=None, stolen=None) + # client = APIClient() + # client.force_authenticate(user=self.user, token='blah') + # data = {'serial_number': '123abc'} + # result = client.put(f'/api/v1/bikes/{bike.id}/check/', data=data) + # + # self.assertEqual(result.status_code, status.HTTP_200_OK) + # self.assertEqual(result.data, {'status': 'pending'}) + # check_cpic_mock.assert_called_once() class TestBikeSignals(TestCase):