Skip to content

Commit

Permalink
try fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ekampf committed Dec 15, 2023
1 parent e23a76e commit 0c19d01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django_multitenant/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ def test_tenant_persists_from_async_task_to_thread(self):
account = projects[0].account

with self.settings(TENANT_USE_ASGIREF=True):
importlib.reload(sys.modules["django_multitenant.utils"])
importlib.reload(sys.modules["django_multitenant.settings"])

# Set the tenant in task
async_to_sync(self.async_set_current_tenant)(account)
self.assertEqual(get_current_tenant(), account)
unset_current_tenant()

with self.settings(TENANT_USE_ASGIREF=False):
importlib.reload(sys.modules["django_multitenant.utils"])
importlib.reload(sys.modules["django_multitenant.settings"])

# Set the tenant in task
async_to_sync(self.async_set_current_tenant)(account)
Expand Down

0 comments on commit 0c19d01

Please sign in to comment.