Fix removing profile details (Closes #894) (#899)

* Fix removing profile details (Closes #894)
* Update tests to properly check setting and removing profile values
This commit is contained in:
Kevin Chung
2019-03-17 09:08:52 -07:00
committed by GitHub
parent bf799fb220
commit 79b7b1dd5c
7 changed files with 130 additions and 39 deletions

View File

@@ -0,0 +1,11 @@
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