tests: fix warning about regexp syntax (#41238)

Regexps must use r'' strings.
This commit is contained in:
Benjamin Dauvergne 2020-04-25 21:26:45 +02:00
parent 1c14ad5bf7
commit dd80c4722d
1 changed files with 2 additions and 2 deletions

View File

@ -400,11 +400,11 @@ def test_registration_email_blacklist(app, settings, db):
response.form.set('email', email)
response = response.form.submit()
return response.status_code == 302
settings.A2_REGISTRATION_EMAIL_BLACKLIST = ['a*@example\.com']
settings.A2_REGISTRATION_EMAIL_BLACKLIST = [r'a*@example\.com']
assert not test_register('aaaa@example.com')
assert test_register('aaaa@example.com.zob')
assert test_register('baaaa@example.com')
settings.A2_REGISTRATION_EMAIL_BLACKLIST = ['a*@example\.com', '^ba*@example\.com$']
settings.A2_REGISTRATION_EMAIL_BLACKLIST = [r'a*@example\.com', r'^ba*@example\.com$']
assert not test_register('aaaa@example.com')
assert not test_register('baaaa@example.com')
assert test_register('bbaaaa@example.com')