Projet

Général

Profil

0001-auth_fc-multiple-existing-emails.patch

Serghei Mihai, 12 avril 2021 16:56

Télécharger (1,19 ko)

Voir les différences:

Subject: [PATCH] auth_fc: multiple existing emails

 tests/auth_fc/test_auth_fc.py | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
tests/auth_fc/test_auth_fc.py
347 347
    assert User.objects.count() == 1
348 348

  
349 349
    response = app.get('/accounts/', status=200)
350

  
351

  
352
def test_login_with_twice_existing_email(settings, app, franceconnect):
353
    user = User(email='john.doe@example.com', first_name='First John', last_name='Doe')
354
    user.set_password('toto')
355
    user.save()
356

  
357
    user = User(email='john.doe@example.com', first_name='Second John', last_name='Doe')
358
    user.set_password('toto')
359
    user.save()
360

  
361
    response = app.get('/login/?service=portail&next=/idp/')
362
    response = response.click(href='callback')
363
    response = franceconnect.handle_authorization(app, response.location, status=302)
350
-