feat(test): Add AN form to basic check

This commit is contained in:
2025-08-10 08:44:28 +02:00
parent 6c43b46007
commit c1ea6cd211

View File

@@ -154,3 +154,14 @@ class BasicViewTest(TestCase):
self.assertEqual(response.status_code, 200)
self.assertContains(response, "TestAdoption1")
self.assertNotContains(response, "TestAdoption5")
def test_an_form_logged_in(self):
self.client.login(username='testuser0', password='12345')
response = self.client.get(reverse('add-adoption'))
self.assertEqual(response.status_code, 200)
def test_an_form_anonymous(self):
response = self.client.get(reverse('add-adoption'))
self.assertEqual(response.status_code, 302)
self.assertEqual(response.url, "/accounts/login/?next=/vermitteln/")