I have an application in django 2.1 and I am using a django-tenants package. I have application accounts there, which in settings.py is in SHARED_APPS. I want to write a unit test for the login view. Every time I get: AssertionError: 403 != 200
Here is my code:
class LoginViewTests(TenantTestCase):
def setUp(self):
super().setUp()
self.client = TenantClient(self.tenant)
def test_login(self):
response = self.client.get(reverse('accounts:login'))
print(response)
self.assertEqual(response.status_code, 200)
Aucun commentaire:
Enregistrer un commentaire