diff options
author | userimack <mahendra.k12@gmail.com> | 2016-01-23 22:17:07 +0530 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2016-01-25 14:23:43 -0500 |
commit | 60586dd7379b295b72d8af4e03423c286913b5e8 (patch) | |
tree | 6f834957ea76305fbcda40e23e836077890d36b8 /tests/absolute_url_overrides | |
parent | abc0777b63057e2ff97eee2ff184356051e14c47 (diff) | |
download | django-60586dd7379b295b72d8af4e03423c286913b5e8.tar.gz |
Fixed #26125 -- Fixed E731 flake warnings.
Diffstat (limited to 'tests/absolute_url_overrides')
-rw-r--r-- | tests/absolute_url_overrides/tests.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/absolute_url_overrides/tests.py b/tests/absolute_url_overrides/tests.py index 7187456112..6879283083 100644 --- a/tests/absolute_url_overrides/tests.py +++ b/tests/absolute_url_overrides/tests.py @@ -10,7 +10,8 @@ class AbsoluteUrlOverrideTests(SimpleTestCase): """ get_absolute_url() functions as a normal method. """ - get_absolute_url = lambda o: '/test-a/%s/' % o.pk + def get_absolute_url(o): + return '/test-a/%s/' % o.pk TestA = self._create_model_class('TestA', get_absolute_url) self.assertTrue(hasattr(TestA, 'get_absolute_url')) @@ -21,7 +22,8 @@ class AbsoluteUrlOverrideTests(SimpleTestCase): """ ABSOLUTE_URL_OVERRIDES should override get_absolute_url(). """ - get_absolute_url = lambda o: '/test-b/%s/' % o.pk + def get_absolute_url(o): + return '/test-b/%s/' % o.pk with self.settings( ABSOLUTE_URL_OVERRIDES={ 'absolute_url_overrides.testb': lambda o: '/overridden-test-b/%s/' % o.pk, |