Skip to content

Commit

Permalink
[req-changes] Added test case when inactive org is set to active
Browse files Browse the repository at this point in the history
  • Loading branch information
pandafy committed Feb 16, 2024
1 parent ca302ae commit bed9c67
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion openwisp_controller/config/tests/test_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,12 @@ def test_organization_disabled_handler(self, mocked_task):
mocked_task.assert_not_called()

with self.subTest('Test task not executed on creating inactive org'):
self._create_org(is_active=False, name='inactive', slug='inactive')
inactive_org = self._create_org(
is_active=False, name='inactive', slug='inactive'
)
mocked_task.assert_not_called()

with self.subTest('Test task not executed on changing inactive to active org'):
inactive_org.is_active = True
inactive_org.save()
mocked_task.assert_not_called()

0 comments on commit bed9c67

Please sign in to comment.