Use http_methods_allowed attribute

This commit is contained in:
Ludovic Stephan 2019-06-03 22:59:43 +02:00
parent f3dbb72f69
commit c4948be1f7
2 changed files with 3 additions and 4 deletions

View file

@ -359,9 +359,9 @@ class AccountDeleteViewTests(ViewTestCaseMixin, TestCase):
"trez": create_user("trez", "#13"),
}
def test_get_redirects(self):
def test_get_405(self):
r = self.client.get(self.url)
self.assertRedirects(r, reverse("kfet.account.read", kwargs=self.url_kwargs))
self.assertEqual(r.status_code, 405)
def test_post_ok(self):
r = self.client.post(self.url, {})