mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-06-16 04:56:05 +00:00
Fix tests
Increased the version of pytest to make it work with py 3.10 [0]. The GET calls no longer return list but the object itself, fixed the tests and assertions to account for that. The tests did not account for the later added `allow_user_remove_domain` setting. And there were issues with missing and non-stopped patchers/mocks. Now all tests are at least passing. [0] https://github.com/pytest-dev/pytest/pull/8540
This commit is contained in:
@ -39,7 +39,7 @@ class TestIntegrationApiApiKeyAdminUser(object):
|
||||
assert res.status_code == 201
|
||||
|
||||
apikey_url_format = "/api/v1/pdnsadmin/apikeys/{0}"
|
||||
apikey_url = apikey_url_format.format(data[0]['id'])
|
||||
apikey_url = apikey_url_format.format(data['id'])
|
||||
|
||||
res = client.delete(apikey_url, headers=basic_auth_admin_headers)
|
||||
|
||||
@ -123,7 +123,7 @@ class TestIntegrationApiApiKeyAdminUser(object):
|
||||
assert res.status_code == 201
|
||||
|
||||
apikey_url_format = "/api/v1/pdnsadmin/apikeys/{0}"
|
||||
apikey_url = apikey_url_format.format(data[0]['id'])
|
||||
apikey_url = apikey_url_format.format(data['id'])
|
||||
res = client.delete(apikey_url, headers=basic_auth_admin_headers)
|
||||
|
||||
assert res.status_code == 204
|
||||
|
Reference in New Issue
Block a user