diff options
Diffstat (limited to '')
-rw-r--r-- | ctrack/conftest.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ctrack/conftest.py b/ctrack/conftest.py new file mode 100644 index 0000000..b994f24 --- /dev/null +++ b/ctrack/conftest.py @@ -0,0 +1,20 @@ +import pytest +from django.test import RequestFactory + +from ctrack.users.models import User +from ctrack.users.tests.factories import UserFactory + + +@pytest.fixture(autouse=True) +def media_storage(settings, tmpdir): + settings.MEDIA_ROOT = tmpdir.strpath + + +@pytest.fixture +def user() -> User: + return UserFactory() + + +@pytest.fixture +def request_factory() -> RequestFactory: + return RequestFactory() |