mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 22:14:25 +01:00
Switch default testing/development domain name to examplectf.com (#1807)
* Use `examplectf.com` as testing/development domain instead of `ctfd.io`
This commit is contained in:
@@ -14,18 +14,22 @@ def test_validate_country_code():
|
||||
|
||||
def test_validate_email():
|
||||
"""Test that the check_email_format() works properly"""
|
||||
assert validate_email("user@ctfd.io") is True
|
||||
assert validate_email("user@examplectf.com") is True
|
||||
assert validate_email("user+plus@gmail.com") is True
|
||||
assert validate_email("user.period1234@gmail.com") is True
|
||||
assert validate_email("user.period1234@b.c") is True
|
||||
assert validate_email("user.period1234@b") is False
|
||||
assert validate_email("no.ampersand") is False
|
||||
assert validate_email("user@") is False
|
||||
assert validate_email("@ctfd.io") is False
|
||||
assert validate_email("@examplectf.com") is False
|
||||
assert validate_email("user.io@ctfd") is False
|
||||
assert validate_email("user\\@ctfd") is False
|
||||
|
||||
for invalid_email in ["user.@ctfd.io", ".user@ctfd.io", "user@ctfd..io"]:
|
||||
for invalid_email in [
|
||||
"user.@examplectf.com",
|
||||
".user@examplectf.com",
|
||||
"user@ctfd..io",
|
||||
]:
|
||||
try:
|
||||
assert validate_email(invalid_email) is False
|
||||
except AssertionError:
|
||||
|
||||
Reference in New Issue
Block a user