-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ [#1451] -- incorporate form logic in the submission renderer
- Loading branch information
1 parent
385d573
commit 0e18ad2
Showing
5 changed files
with
116 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from urllib.parse import urlsplit | ||
|
||
from django.conf import settings | ||
from django.http import HttpRequest | ||
from django.test import RequestFactory | ||
from django.urls import reverse | ||
|
||
|
||
def get_request() -> HttpRequest: | ||
""" | ||
Build a mock request. | ||
:meta private: | ||
""" | ||
base = urlsplit(settings.BASE_URL) | ||
request = RequestFactory().get( | ||
reverse("core:form-list"), | ||
HTTP_HOST=base.netloc, | ||
**{"wsgi.url_scheme": base.scheme}, | ||
) | ||
return request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters