forked from DGNum/gestioCOF
Lisibilité: t_urls -> reversed_urls
This commit is contained in:
parent
b1c69eddb5
commit
bb72a16b64
2 changed files with 7 additions and 7 deletions
|
@ -228,7 +228,7 @@ class RegistrationFormViewTests(ViewTestCaseMixin, TestCase):
|
|||
auth_forbidden = [None, "user", "member"]
|
||||
|
||||
def test_empty(self):
|
||||
r = self.client.get(self.t_urls[0])
|
||||
r = self.client.get(self.reversed_urls[0])
|
||||
|
||||
self.assertIn("user_form", r.context)
|
||||
self.assertIn("profile_form", r.context)
|
||||
|
@ -241,7 +241,7 @@ class RegistrationFormViewTests(ViewTestCaseMixin, TestCase):
|
|||
u.last_name = "last"
|
||||
u.save()
|
||||
|
||||
r = self.client.get(self.t_urls[1])
|
||||
r = self.client.get(self.reversed_urls[1])
|
||||
|
||||
self.assertIn("user_form", r.context)
|
||||
self.assertIn("profile_form", r.context)
|
||||
|
@ -253,7 +253,7 @@ class RegistrationFormViewTests(ViewTestCaseMixin, TestCase):
|
|||
self.assertEqual(user_form["last_name"].initial, "last")
|
||||
|
||||
def test_clipper(self):
|
||||
r = self.client.get(self.t_urls[2])
|
||||
r = self.client.get(self.reversed_urls[2])
|
||||
|
||||
self.assertIn("user_form", r.context)
|
||||
self.assertIn("profile_form", r.context)
|
||||
|
|
|
@ -350,7 +350,7 @@ class ViewTestCaseMixin(TestCaseMixin):
|
|||
]
|
||||
|
||||
@property
|
||||
def t_urls(self):
|
||||
def reversed_urls(self):
|
||||
return [
|
||||
reverse(
|
||||
url_conf["name"],
|
||||
|
@ -363,16 +363,16 @@ class ViewTestCaseMixin(TestCaseMixin):
|
|||
|
||||
@property
|
||||
def url(self):
|
||||
return self.t_urls[0]
|
||||
return self.reversed_urls[0]
|
||||
|
||||
def test_urls(self):
|
||||
for url, conf in zip(self.t_urls, self.urls_conf):
|
||||
for url, conf in zip(self.reversed_urls, self.urls_conf):
|
||||
self.assertEqual(url, conf["expected"])
|
||||
|
||||
def test_forbidden(self):
|
||||
for method in self.http_methods:
|
||||
for user in self.auth_forbidden:
|
||||
for url in self.t_urls:
|
||||
for url in self.reversed_urls:
|
||||
self.check_forbidden(method, url, user)
|
||||
|
||||
def check_forbidden(self, method, url, user=None):
|
||||
|
|
Loading…
Reference in a new issue