MCPcopy Create free account
hub / github.com/codingjoe/django-mail-auth / test_get_login_url

Method test_get_login_url

tests/test_forms.py:14–28  ·  view source on GitHub ↗
(self, rf)

Source from the content-addressed store, hash-verified

12
13class TestEmailLoginForm:
14 def test_get_login_url(self, rf):
15 request = rf.get("/")
16 form = EmailLoginForm(request=request)
17 assert (
18 form.get_login_url(request, "TOKEN")
19 == "http://testserver/accounts/login/TOKEN"
20 )
21 assert (
22 form.get_login_url(
23 request,
24 "TOKEN",
25 next="/path/?utm_source=website&utm_medium=email#some-anchor",
26 )
27 == "http://testserver/accounts/login/TOKEN?next=/path/%3Futm_source%3Dwebsite%26utm_medium%3Demail%23some-anchor"
28 )
29
30 def test_send_mail__html_template(self):
31 class MyEmailLoginForm(EmailLoginForm):

Callers

nothing calls this directly

Calls 3

EmailLoginFormClass · 0.90
getMethod · 0.80
get_login_urlMethod · 0.45

Tested by

no test coverage detected