Simplies the test code a bit.

This commit is contained in:
Daniel Roschka 2015-09-05 19:20:44 +02:00
parent 3ca4cac89a
commit 99f1284d43
1 changed files with 2 additions and 6 deletions

View File

@ -57,9 +57,7 @@ class PostTests(TestCase):
response = self.client.post(reverse("delete_record", response = self.client.post(reverse("delete_record",
kwargs={'dns_server': dns_server, kwargs={'dns_server': dns_server,
'zone_name': zone_name}), 'zone_name': zone_name}),
{"dns_server": dns_server, {"rr_list": []}, follow=True)
"zone_name": zone_name,
"rr_list": []}, follow=True)
self.assertRedirects(response, self.assertRedirects(response,
reverse("zone_list", reverse("zone_list",
kwargs={'dns_server': dns_server, kwargs={'dns_server': dns_server,
@ -75,9 +73,7 @@ class PostTests(TestCase):
response = self.client.post(reverse("delete_record", response = self.client.post(reverse("delete_record",
kwargs={'dns_server': dns_server, kwargs={'dns_server': dns_server,
'zone_name': zone_name}), 'zone_name': zone_name}),
{"dns_server": dns_server, {"rr_list": ["testrecord1.testzone1.test.net",
"zone_name": zone_name,
"rr_list": ["testrecord1.testzone1.test.net",
"testrecord2.testzone1.test.net"]}) "testrecord2.testzone1.test.net"]})
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)