Skip to content

Commit

Permalink
[Fixes #12713] Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiagiupponi committed Nov 12, 2024
1 parent bf17472 commit 853a4f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions geonode/security/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ def add(self, module_path):
self.__check_item(item)
self.REGISTRY.append(item)

def reset(self):
self.REGISTRY = []

def _register(self):
for module_path in settings.PERMISSIONS_HANDLERS:
self.add(module_path)
Expand Down
3 changes: 3 additions & 0 deletions geonode/security/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2678,6 +2678,9 @@ class TestPermissionsRegistry(GeoNodeBaseTestSupport):
Test to verify the permissions registry
"""

def tearDown(self):
permissions_registry.reset()

def test_registry_is_correctly_initiated(self):
"""
The permissions registry should initiated correctly
Expand Down

0 comments on commit 853a4f6

Please sign in to comment.