refactor: formatting
This commit is contained in:
parent
ea4d15b99a
commit
462bb8f485
@ -21,12 +21,11 @@ class BasicViewTest(TestCase):
|
|||||||
test_user0.save()
|
test_user0.save()
|
||||||
|
|
||||||
ans = []
|
ans = []
|
||||||
for i in range(0,8):
|
for i in range(0, 8):
|
||||||
ans.append(baker.make(AdoptionNotice, name=f"TestAdoption{i}"))
|
ans.append(baker.make(AdoptionNotice, name=f"TestAdoption{i}"))
|
||||||
for i in range(0,4):
|
for i in range(0, 4):
|
||||||
AdoptionNotice.objects.get(name=f"TestAdoption{i}").set_active()
|
AdoptionNotice.objects.get(name=f"TestAdoption{i}").set_active()
|
||||||
|
|
||||||
|
|
||||||
def test_index_logged_in(self):
|
def test_index_logged_in(self):
|
||||||
self.client.login(username='testuser0', password='12345')
|
self.client.login(username='testuser0', password='12345')
|
||||||
|
|
||||||
@ -42,4 +41,3 @@ class BasicViewTest(TestCase):
|
|||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
self.assertContains(response, "TestAdoption1")
|
self.assertContains(response, "TestAdoption1")
|
||||||
self.assertNotContains(response, "TestAdoption4") # Should not be active, therefore not shown
|
self.assertNotContains(response, "TestAdoption4") # Should not be active, therefore not shown
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user