Merge "Replace deprecated assertDictContainsSubset"

This commit is contained in:
Zuul 2021-12-02 20:12:26 +00:00 committed by Gerrit Code Review
commit 19b93d8b03
2 changed files with 9 additions and 6 deletions

View File

@ -49,7 +49,7 @@ class ApiV2TsigKeysTest(ApiV2TestCase):
self.assertIsNone(response.json['updated_at'])
# Check the supplied values returned are what we expect
self.assertDictContainsSubset(fixture, response.json)
self.assertLessEqual(fixture.items(), response.json.items())
def test_create_tsigkey_validation(self):
# NOTE: The schemas should be tested separately to the API. So we

View File

@ -2903,15 +2903,18 @@ class CentralServiceTest(CentralTestCase):
# Compare the actual values of attributes and ns_records
for k in range(0, len(values['attributes'])):
self.assertDictContainsSubset(
values['attributes'][k],
self.assertLessEqual(
values['attributes'][k].items(),
pool['attributes'][k].to_primitive()['designate_object.data']
.items()
)
for k in range(0, len(values['ns_records'])):
self.assertDictContainsSubset(
values['ns_records'][k],
pool['ns_records'][k].to_primitive()['designate_object.data'])
self.assertLessEqual(
values['ns_records'][k].items(),
pool['ns_records'][k].to_primitive()['designate_object.data']
.items()
)
def test_get_pool(self):
# Create a server pool