19 lines
645 B
Python
19 lines
645 B
Python
|
from django.test import TestCase, Client
|
||
|
|
||
|
from core import settings
|
||
|
|
||
|
client = Client()
|
||
|
|
||
|
|
||
|
class IssueApiTest(TestCase):
|
||
|
|
||
|
def test_issues(self):
|
||
|
response = client.get('/api/2/users/')
|
||
|
self.assertEqual(response.status_code, 200)
|
||
|
self.assertEqual(len(response.json()), 1)
|
||
|
self.assertEqual(response.json()[0]['username'], settings.LEGACY_USER_NAME)
|
||
|
self.assertEqual(response.json()[0]['email'], 'mail@' + settings.MAIL_DOMAIN)
|
||
|
self.assertEqual(response.json()[0]['first_name'], '')
|
||
|
self.assertEqual(response.json()[0]['last_name'], '')
|
||
|
self.assertEqual(response.json()[0]['id'], 1)
|