Skip to content

Commit 375aec4

Browse files
chore(api): prepare for Python 3.12
1 parent b6299d2 commit 375aec4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

api/desecapi/tests/test_rrsets.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ def test_update_my_rr_set_with_invalid_payload_type(self):
12421242
self.my_rr_set_domain.name, subname, "A", data
12431243
)
12441244
self.assertStatus(response, status.HTTP_400_BAD_REQUEST)
1245-
self.assertEquals(
1245+
self.assertEqual(
12461246
response.data["non_field_errors"][0],
12471247
"Invalid data. Expected a dictionary, but got list.",
12481248
)
@@ -1252,7 +1252,7 @@ def test_update_my_rr_set_with_invalid_payload_type(self):
12521252
self.my_rr_set_domain.name, subname, "A", data
12531253
)
12541254
self.assertStatus(response, status.HTTP_400_BAD_REQUEST)
1255-
self.assertEquals(
1255+
self.assertEqual(
12561256
response.data["non_field_errors"][0],
12571257
"Invalid data. Expected a dictionary, but got str.",
12581258
)
@@ -1333,19 +1333,19 @@ def test_update_essential_properties(self):
13331333
data = {"records": ["3.2.3.4"], "ttl": 3620, "subname": "test2", "type": "A"}
13341334
response = self.client.patch(url, data)
13351335
self.assertStatus(response, status.HTTP_400_BAD_REQUEST)
1336-
self.assertEquals(response.data["subname"][0].code, "read-only-on-update")
1336+
self.assertEqual(response.data["subname"][0].code, "read-only-on-update")
13371337
response = self.client.put(url, data)
13381338
self.assertStatus(response, status.HTTP_400_BAD_REQUEST)
1339-
self.assertEquals(response.data["subname"][0].code, "read-only-on-update")
1339+
self.assertEqual(response.data["subname"][0].code, "read-only-on-update")
13401340

13411341
# Changing the type is expected to cause an error
13421342
data = {"records": ["3.2.3.4"], "ttl": 3620, "subname": "test", "type": "TXT"}
13431343
response = self.client.patch(url, data)
13441344
self.assertStatus(response, status.HTTP_400_BAD_REQUEST)
1345-
self.assertEquals(response.data["type"][0].code, "read-only-on-update")
1345+
self.assertEqual(response.data["type"][0].code, "read-only-on-update")
13461346
response = self.client.put(url, data)
13471347
self.assertStatus(response, status.HTTP_400_BAD_REQUEST)
1348-
self.assertEquals(response.data["type"][0].code, "read-only-on-update")
1348+
self.assertEqual(response.data["type"][0].code, "read-only-on-update")
13491349

13501350
# Changing "created" is no-op
13511351
response = self.client.get(url)

0 commit comments

Comments
 (0)