mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 14:04:20 +01:00
* Format Javascript and CSS files with `prettier`: `prettier --write 'CTFd/themes/**/*'` * Format Python with `black`: `black CTFd` & `black tests` * Travis now uses xenial instead of trusty.
12 lines
370 B
Python
12 lines
370 B
Python
from CTFd.utils.validators import validate_country_code
|
|
from marshmallow import ValidationError
|
|
|
|
|
|
def test_validate_country_code():
|
|
assert validate_country_code("") is None
|
|
# TODO: This looks poor, when everything moves to pytest we should remove exception catches like this.
|
|
try:
|
|
validate_country_code("ZZ")
|
|
except ValidationError:
|
|
pass
|