Skip to content

Commit

Permalink
chore(tests): remove unused fixture. Allow required db-access
Browse files Browse the repository at this point in the history
  • Loading branch information
fugal-dy committed Jan 31, 2022
1 parent be444a6 commit 29894c6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 0 additions & 8 deletions emeis/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
from pytest_factoryboy import register
from rest_framework.test import APIClient

from emeis.core.models import ACL, Role, Scope, User


@pytest.fixture(autouse=True)
def reset_config_classes(settings):
Expand Down Expand Up @@ -62,9 +60,3 @@ def client(db):
@pytest.fixture(scope="function", autouse=True)
def _autoclear_cache():
cache.clear()


@pytest.fixture(autouse=True)
def _remove_bootstrap_data(db):
for model in [User, Scope, Role, ACL]:
getattr(model, "objects").all().delete()
2 changes: 1 addition & 1 deletion emeis/core/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def test_can_authenticate(db, user):
assert auth == user


def test_scope_hierarchical_name(scope_factory):
def test_scope_hierarchical_name(db, scope_factory):
root = scope_factory()
child = scope_factory(parent=root)
grandchild = scope_factory(parent=child)
Expand Down

0 comments on commit 29894c6

Please sign in to comment.