mirror of
https://github.com/fspc/workstand.git
synced 2025-02-23 17:23:24 -05:00
Endpoint requires auth now.
This commit is contained in:
parent
2787578c0e
commit
58c5d400ac
@ -21,6 +21,7 @@ class TestBikeApi(TestCase):
|
|||||||
|
|
||||||
def test_endpoint_exists(self):
|
def test_endpoint_exists(self):
|
||||||
client = APIClient()
|
client = APIClient()
|
||||||
|
client.force_authenticate(user=self.user, token='blah')
|
||||||
result = client.get('/api/v1/bikes/')
|
result = client.get('/api/v1/bikes/')
|
||||||
|
|
||||||
self.assertEqual(result.status_code, status.HTTP_200_OK)
|
self.assertEqual(result.status_code, status.HTTP_200_OK)
|
||||||
@ -28,6 +29,7 @@ class TestBikeApi(TestCase):
|
|||||||
def test_returns_bikes(self):
|
def test_returns_bikes(self):
|
||||||
mommy.make('bike.bike', 10)
|
mommy.make('bike.bike', 10)
|
||||||
client = APIClient()
|
client = APIClient()
|
||||||
|
client.force_authenticate(user=self.user, token='blah')
|
||||||
result = client.get('/api/v1/bikes/')
|
result = client.get('/api/v1/bikes/')
|
||||||
|
|
||||||
self.assertEqual(result.status_code, status.HTTP_200_OK)
|
self.assertEqual(result.status_code, status.HTTP_200_OK)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user