Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
interfect
funkwhale
Commits
de777764
Verified
Commit
de777764
authored
Mar 31, 2018
by
Eliot Berriot
Browse files
Fake_request fixture for django requests
parent
b5a4b2ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
api/tests/conftest.py
View file @
de777764
...
...
@@ -6,6 +6,8 @@ import tempfile
from
django.contrib.auth.models
import
AnonymousUser
from
django.core.cache
import
cache
as
django_cache
from
django.test
import
client
from
dynamic_preferences.registries
import
global_preferences_registry
from
rest_framework.test
import
APIClient
...
...
@@ -118,6 +120,11 @@ def api_request():
return
APIRequestFactory
()
@
pytest
.
fixture
def
fake_request
():
return
client
.
RequestFactory
()
@
pytest
.
fixture
def
activity_registry
():
r
=
record
.
registry
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment