mirror of
https://github.com/simon987/nyaa.git
synced 2025-12-20 01:55:58 +00:00
Update tests, add tests structure for views
This commit is contained in:
@@ -18,14 +18,14 @@ class ApiHandlerTests(NyaaTestCase):
|
||||
|
||||
def test_no_authorization(self):
|
||||
""" Test that API is locked unless you're logged in """
|
||||
rv = self.app.get('/api/info/1')
|
||||
rv = self.client.get('/api/info/1')
|
||||
data = json.loads(rv.get_data())
|
||||
self.assertDictEqual({'errors': ['Bad authorization']}, data)
|
||||
|
||||
@unittest.skip('Not yet implemented')
|
||||
def test_bad_credentials(self):
|
||||
""" Test that API is locked unless you're logged in """
|
||||
rv = self.app.get('/api/info/1')
|
||||
rv = self.client.get('/api/info/1')
|
||||
data = json.loads(rv.get_data())
|
||||
self.assertDictEqual({'errors': ['Bad authorization']}, data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user