mocking added thruout apps.lyric.tests.test_views, where UTs mock message sending; status message loop added to base.html below navbar; hardcoded assert and model/view values aligned across lyric app, UTs & FTs
This commit is contained in:
@@ -1,7 +1,17 @@
|
||||
from django.contrib import messages
|
||||
from django.core.mail import send_mail
|
||||
from django.shortcuts import redirect
|
||||
|
||||
def send_login_email(request):
|
||||
email = request.POST["email"]
|
||||
send_mail("A magic login link for your Dashboard", "magic link sample body", "adman@howdy.earthmanrpg.me", [email])
|
||||
send_mail(
|
||||
"A magic login link to your Dashboard",
|
||||
"Use this magic link to login to your Dashboard",
|
||||
"adman@howdy.earthmanrpg.me",
|
||||
[email],
|
||||
)
|
||||
messages.success(
|
||||
request,
|
||||
"Check your email!—there you'll find a magic login link. But hurry… it's only temporary!",
|
||||
)
|
||||
return redirect("/")
|
||||
|
||||
Reference in New Issue
Block a user