-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
render members:login FormView POST call
- Loading branch information
1 parent
952226c
commit 14393f8
Showing
4 changed files
with
73 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -173,6 +173,38 @@ | |
</section> | ||
|
||
|
||
</main> | ||
''' | ||
# --- | ||
# name: TestLoginView.test_post[login_view_content] | ||
''' | ||
<main class="s-main" id="main" role="main"> | ||
|
||
|
||
|
||
|
||
|
||
|
||
<section class="s-title-01 mt-lg-5"> | ||
<div class="s-title-01__container container"> | ||
<div class="s-title-01__row row"> | ||
<div class="s-title-01__col col-lg-8 col-12"> | ||
<h1 class="s-title-01__title h1">Se connecter | S'inscrire</h1> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
<section class="s-section"> | ||
<div class="s-section__container container"> | ||
<div class="s-section__row row"> | ||
<div class="s-section__col col-12 col-lg-7"> | ||
Un lien de connexion vous a été envoyé par à l'adresse [email protected]. Veuillez vérifier votre boîte de réception et cliquer sur le lien pour vous connecter. | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
|
||
</main> | ||
''' | ||
# --- |
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 |
---|---|---|
|
@@ -73,3 +73,10 @@ def test_content(self, client, db, next, snapshot): | |
assert response.status_code == 200 | ||
content = parse_response_to_soup(response, selector="main") | ||
assert str(content) == snapshot(name="login_view_content") | ||
|
||
def test_post(self, client, db, snapshot): | ||
email = "[email protected]" | ||
response = client.post(reverse("members:login"), data={"email": email}) | ||
assert response.status_code == 200 | ||
content = parse_response_to_soup(response, selector="main") | ||
assert str(content) == snapshot(name="login_view_content") |
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,28 @@ | ||
{% extends "layouts/base.html" %} | ||
{% load static %} | ||
{% load i18n %} | ||
{% load theme_inclusion %} | ||
{% block title %}Connexion {{ block.super }}{% endblock %} | ||
{% block meta_description %} | ||
{% trans "Login | Sign in" %} | ||
{% endblock meta_description %} | ||
{% block content %} | ||
<section class="s-title-01 mt-lg-5"> | ||
<div class="s-title-01__container container"> | ||
<div class="s-title-01__row row"> | ||
<div class="s-title-01__col col-lg-8 col-12"> | ||
<h1 class="s-title-01__title h1">{% trans "Login | Sign in" %}</h1> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
<section class="s-section"> | ||
<div class="s-section__container container"> | ||
<div class="s-section__row row"> | ||
<div class="s-section__col col-12 col-lg-7"> | ||
Un lien de connexion vous a été envoyé par à l'adresse {{ email }}. Veuillez vérifier votre boîte de réception et cliquer sur le lien pour vous connecter. | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
{% endblock content %} |