django-musician/musician/tests.py

15 lines
415 B
Python
Raw Normal View History

2019-10-10 07:18:34 +00:00
from django.test import TestCase
2019-12-17 09:25:10 +00:00
class DomainsTestCase(TestCase):
def test_domain_not_found(self):
response = self.client.post(
'/auth/login/',
{'username': 'admin', 'password': 'admin'},
follow=True
)
self.assertEqual(200, response.status_code)
response = self.client.get('/domains/3/')
self.assertEqual(404, response.status_code)