mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-04 15:29:10 -07:00
Fix Python 3.12 unit tests (#7348)
* Re-enable Python 3.12 unit tests. * Stop using deprecated alias. * Stop using long deprecated subset comparison function. * Avoid another alias. * Fix name, add Python 2 compatibility. * Properly make backwards compatible.
This commit is contained in:
parent
160e00e5b9
commit
6c9713b36c
9 changed files with 55 additions and 41 deletions
|
@ -45,7 +45,7 @@ class TestDNSimple(ModuleTestCase):
|
|||
def test_account_token(self, mock_whoami):
|
||||
mock_whoami.return_value.data.account = 42
|
||||
ds = self.module.DNSimpleV2('fake', 'fake', True, self.module)
|
||||
self.assertEquals(ds.account, 42)
|
||||
self.assertEqual(ds.account, 42)
|
||||
|
||||
@patch('dnsimple.service.Accounts.list_accounts')
|
||||
@patch('dnsimple.service.Identity.whoami')
|
||||
|
@ -61,4 +61,4 @@ class TestDNSimple(ModuleTestCase):
|
|||
mock_accounts.return_value.data = [42]
|
||||
mock_whoami.return_value.data.account = None
|
||||
ds = self.module.DNSimpleV2('fake', 'fake', True, self.module)
|
||||
self.assertEquals(ds.account, 42)
|
||||
self.assertEqual(ds.account, 42)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue