From 58c5d400ac3b07b6956494a8a8b0d97a84ce32f5 Mon Sep 17 00:00:00 2001 From: Drew Larson Date: Sat, 4 Feb 2017 08:27:34 -0600 Subject: [PATCH] Endpoint requires auth now. --- bikeshop_project/bike/tests.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bikeshop_project/bike/tests.py b/bikeshop_project/bike/tests.py index 0401c1b..b0e3429 100644 --- a/bikeshop_project/bike/tests.py +++ b/bikeshop_project/bike/tests.py @@ -21,6 +21,7 @@ class TestBikeApi(TestCase): def test_endpoint_exists(self): client = APIClient() + client.force_authenticate(user=self.user, token='blah') result = client.get('/api/v1/bikes/') self.assertEqual(result.status_code, status.HTTP_200_OK) @@ -28,6 +29,7 @@ class TestBikeApi(TestCase): def test_returns_bikes(self): mommy.make('bike.bike', 10) client = APIClient() + client.force_authenticate(user=self.user, token='blah') result = client.get('/api/v1/bikes/') self.assertEqual(result.status_code, status.HTTP_200_OK)