aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/conftest.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-01-19 15:57:06 +0000
committerMatthew Lemon <lemon@matthewlemon.com>2020-01-19 15:57:06 +0000
commit9d76a3c52b8310726ec09e0262813f0438c21df6 (patch)
tree4acf47dce6c3aa75f8ad7c5cb56fe6486c2d64a7 /ctrack/conftest.py
init commit - from cookiecutter
Diffstat (limited to 'ctrack/conftest.py')
-rw-r--r--ctrack/conftest.py20
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()