Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests] Fix test failures with Python 3.12 #953 #954

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion openwisp_controller/config/tests/test_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,7 @@ def test_ip_fields_not_duplicated(self):
self.assertIsNone(c1.device.management_ip)
self.assertEqual(c2.device.management_ip, '192.168.1.99')
# other organization is not affected
self.assertEquals(c3.device.last_ip, '127.0.0.1')
self.assertEqual(c3.device.last_ip, '127.0.0.1')
self.assertEqual(c3.device.management_ip, '192.168.1.99')

with self.subTest('test interaction with DeviceChecksumView caching'):
Expand Down
3 changes: 2 additions & 1 deletion openwisp_controller/config/tests/test_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@ def test_context_regression(self):
template_qs = Template.objects.filter(type='vpn')
self.assertEqual(template_qs.count(), 1)
t = template_qs.first()
self.assertDictContainsSubset(_original_context, t.get_context())
for key, value in _original_context.items():
self.assertEqual(t.get_context().get(key), value)
self.assertEqual(app_settings.CONTEXT, _original_context)

with self.subTest(
Expand Down
Loading