diff options
| author | Alexander Todorov <atodorov@mrsenko.com> | 2020-09-14 13:28:17 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-14 12:28:17 +0200 |
| commit | 5fab16392fc00702a5d0288378892ec48fe67dc6 (patch) | |
| tree | b7c191f19978645cee2df9027d571db302d5523c /tests/modeladmin/tests.py | |
| parent | bcc2befd0e9c1885e45b46d0b0bcdc11def8b249 (diff) | |
Fixed #32003 -- Added obj argument to has_perm() methods in tests.
Diffstat (limited to 'tests/modeladmin/tests.py')
| -rw-r--r-- | tests/modeladmin/tests.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/modeladmin/tests.py b/tests/modeladmin/tests.py index 74db14d5ac..00de9f7523 100644 --- a/tests/modeladmin/tests.py +++ b/tests/modeladmin/tests.py @@ -25,7 +25,7 @@ class MockRequest: class MockSuperUser: - def has_perm(self, perm): + def has_perm(self, perm, obj=None): return True @@ -730,19 +730,19 @@ class ModelAdminPermissionTests(SimpleTestCase): return app_label == 'modeladmin' class MockViewUser(MockUser): - def has_perm(self, perm): + def has_perm(self, perm, obj=None): return perm == 'modeladmin.view_band' class MockAddUser(MockUser): - def has_perm(self, perm): + def has_perm(self, perm, obj=None): return perm == 'modeladmin.add_band' class MockChangeUser(MockUser): - def has_perm(self, perm): + def has_perm(self, perm, obj=None): return perm == 'modeladmin.change_band' class MockDeleteUser(MockUser): - def has_perm(self, perm): + def has_perm(self, perm, obj=None): return perm == 'modeladmin.delete_band' def test_has_view_permission(self): |
