Projet

Général

Profil

Development #72358

auth_fc: à l'inscription le mail contient AnonymousUser au lieu du nom de l'usager

Ajouté par Benjamin Dauvergne il y a plus d'un an. Mis à jour il y a plus d'un an.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
-
Début:
13 décembre 2022
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

Ce qui est bien c'est que c'est même vérifié par les tests ;) :

diff --git a/tests/auth_fc/test_auth_fc.py b/tests/auth_fc/test_auth_fc.py
index 7f5a5825..cd49e5bc 100644
--- a/tests/auth_fc/test_auth_fc.py
+++ b/tests/auth_fc/test_auth_fc.py
@@ -104,7 +104,7 @@ def test_login_username_autofocus(settings, app, franceconnect):
     assert response.pyquery('#id_username').attr.autofocus is not None

-def test_create(settings, app, franceconnect, hooks, service):
+def test_create(settings, app, franceconnect, hooks, service, mailoutbox):
     # test direct creation
     set_service(app, service)
     response = app.get('/login/?next=/idp/')
@@ -122,6 +122,14 @@ def test_create(settings, app, franceconnect, hooks, service):
         Event.objects.filter(type__name='user.registration', user=user).which_references(service).count() == 1
     )

+    # check registration email
+    assert len(mailoutbox) == 1
+    assert mailoutbox[0].subject == 'Account creation using FranceConnect'
+    for body in (mailoutbox[0].body, mailoutbox[0].alternatives[0][0]):
+        assert 'Hi AnonymousUser,' in body


Fichiers

Révisions associées

Révision 5dddd1c6 (diff)
Ajouté par Benjamin Dauvergne il y a plus d'un an

auth_fc: set the created user in the registration mail template context (#72358)

Révision 9e7e6dcf (diff)
Ajouté par Benjamin Dauvergne il y a plus d'un an

auth_fc: provision user's informations on registration (#72358)

Historique

#2

Mis à jour par Benjamin Dauvergne il y a plus d'un an

  • Assigné à mis à Benjamin Dauvergne
#4

Mis à jour par Valentin Deniaud il y a plus d'un an

  • Statut changé de Solution proposée à Solution validée
#5

Mis à jour par Benjamin Dauvergne il y a plus d'un an

  • Statut changé de Solution validée à Résolu (à déployer)
commit 9e7e6dcfba2d472e65251c7957373fc22d585340
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Tue Dec 13 16:44:23 2022 +0100

    auth_fc: provision user's informations on registration (#72358)

commit 5dddd1c67489813a33bf096ee92ae1d463e64d1d
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Tue Dec 13 16:40:58 2022 +0100

    auth_fc: set the created user in the registration mail template context (#72358)
#6

Mis à jour par Transition automatique il y a plus d'un an

  • Statut changé de Résolu (à déployer) à Solution déployée
#7

Mis à jour par Transition automatique il y a environ un an

Automatic expiration

Formats disponibles : Atom PDF