From 47f9d2a0c06547eb81b3e1383996a71c821df7e3 Mon Sep 17 00:00:00 2001 From: Peter Eckel Date: Thu, 21 Dec 2023 17:35:54 +0100 Subject: [PATCH] Python 3.12 compatibility fixes --- netbox_dns/tests/zone/test_auto_ns.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netbox_dns/tests/zone/test_auto_ns.py b/netbox_dns/tests/zone/test_auto_ns.py index 9ed3becd..75929c27 100644 --- a/netbox_dns/tests/zone/test_auto_ns.py +++ b/netbox_dns/tests/zone/test_auto_ns.py @@ -231,7 +231,7 @@ def test_delete_ns_ns_record_removed(self): def test_delete_soa_ns_exception(self): nameserver = self.nameservers[0] - with self.assertRaisesRegexp( + with self.assertRaisesRegex( ProtectedError, r"protected foreign keys: 'Zone\.soa_mname'." ): nameserver.delete() @@ -242,7 +242,7 @@ def test_delete_soa_ns_exception_ns_record_retained(self): zone.nameservers.add(nameserver) - with self.assertRaisesRegexp( + with self.assertRaisesRegex( ProtectedError, r"protected foreign keys: 'Zone\.soa_mname'." ): nameserver.delete()