Test API info endpoint

This commit is contained in:
Oliver Walters 2020-04-14 01:18:30 +10:00
parent b286a5e30c
commit 38fab9c681

View File

@ -36,8 +36,12 @@ class APITests(APITestCase):
response = self.client.get(url, format='json') response = self.client.get(url, format='json')
print(response) data = response.json()
print(dir(response)) self.assertIn('server', data)
self.assertIn('version', data)
self.assertIn('instance', data)
self.assertEquals('InvenTree', data['server'])
def test_get_token_fail(self): def test_get_token_fail(self):
""" Ensure that an invalid user cannot get a token """ """ Ensure that an invalid user cannot get a token """