The `unit/apikey` directory is removed because it does not contain any
tests. Same for `unit/test_decorators.py`.
The `fixture` module is renamed to the special-name `conftest` [0] so
they are available in all tests without the need to import them. With
that in place, I removed all now unneeded or previously already unused
imports from the tests.
Also removed that wierd `sys.path` bit from `unit/zone/test_admin_apikey.py`,
no idea what that was originally intended for.

[0] https://docs.pytest.org/en/6.2.x/fixture.html#conftest-py-sharing-fixtures-across-multiple-files
This commit is contained in:
corubba
2022-06-24 14:19:52 +02:00
committed by Ymage
parent e920bf5009
commit 8d849ee2a1
15 changed files with 8 additions and 43 deletions

View File

@ -4,8 +4,7 @@ from collections import namedtuple
from powerdnsadmin.lib.validators import validate_apikey
from powerdnsadmin.lib.schema import ApiKeySchema
from tests.fixtures import client, initial_data, basic_auth_admin_headers
from tests.fixtures import user_apikey_data, admin_apikey_data, zone_data
from tests.conftest import user_apikey_data, admin_apikey_data
class TestIntegrationApiApiKeyAdminUser(object):

View File

@ -1,11 +1,8 @@
import pytest
import json
from collections import namedtuple
from powerdnsadmin.lib.validators import validate_zone
from powerdnsadmin.lib.schema import DomainSchema
from tests.fixtures import client, initial_data, basic_auth_user_headers
from tests.fixtures import zone_data
class TestIntegrationApiZoneUser(object):