mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-08-01 10:13:44 +00:00
Cleanup
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:
@@ -1,7 +1,6 @@
|
||||
import json
|
||||
import pytest
|
||||
from unittest.mock import patch
|
||||
from base64 import b64encode
|
||||
from collections import namedtuple
|
||||
|
||||
import powerdnsadmin
|
||||
@@ -10,10 +9,8 @@ from powerdnsadmin.models.domain import Domain
|
||||
from powerdnsadmin.models.api_key import ApiKey
|
||||
from powerdnsadmin.models.role import Role
|
||||
from powerdnsadmin.lib.validators import validate_zone
|
||||
from powerdnsadmin.lib.schema import DomainSchema, ApiKeySchema
|
||||
from tests.fixtures import client, initial_data, created_zone_data
|
||||
from tests.fixtures import user_apikey, zone_data
|
||||
from tests.fixtures import user_apikey_data, load_data
|
||||
from powerdnsadmin.lib.schema import DomainSchema
|
||||
from tests.conftest import user_apikey_data, load_data
|
||||
|
||||
|
||||
class TestUnitApiZoneUserApiKey(object):
|
||||
|
Reference in New Issue
Block a user