Skip to content

Commit af0d99b

Browse files
committed
[chores] Fixed tests to include organization in location add params
1 parent 76e1527 commit af0d99b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

openwisp_controller/geo/tests/test_admin.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ def setUp(self):
2929
"""override TestAdminMixin.setUp"""
3030
pass
3131

32+
def _get_location_add_params(self, **kwargs):
33+
params = super()._get_location_add_params(**kwargs)
34+
if "organization" not in kwargs:
35+
params["organization"] = self._get_org().id
36+
return params
37+
3238
def _create_multitenancy_test_env(self, vpn=False):
3339
org1 = self._create_organization(name="test1org")
3440
org2 = self._create_organization(name="test2org")

0 commit comments

Comments
 (0)