tests: fix warning about regexp syntax (#41238)
Regexps must use r'' strings.
This commit is contained in:
parent
1c14ad5bf7
commit
dd80c4722d
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue