Skip to content

Commit

Permalink
[fix] Fixed failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
pandafy committed Jun 24, 2024
1 parent 188e393 commit a1cc8db
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions openwisp_controller/subnet_division/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ def test_multiple_vpnclient_delete(self):
)

@patch('logging.Logger.info')
def test_subnets_exhausted(self, mocked_logger):
def test_subnets_exhausted(self, mocked_logger, *args):
subnet = self._get_master_subnet(
'10.0.0.0/29', master_subnet=self.master_subnet
)
Expand All @@ -518,7 +518,10 @@ def test_subnets_exhausted(self, mocked_logger):
device=self._create_device(mac_address='00:11:22:33:44:66')
)
config2.templates.add(self.template)
mocked_logger.assert_called_with(f'Cannot create more subnets of {subnet}')
self.assertEqual(
mocked_logger.call_args_list[4][0][0],
f'Cannot create more subnets of {subnet}',
)
notification = Notification.objects.first()
self.assertEqual(notification.level, 'error')
self.assertEqual(notification.type, 'generic_message')
Expand Down

0 comments on commit a1cc8db

Please sign in to comment.