Update tests to reflect new Alphabet validators
This commit is contained in:
parent
9db981203d
commit
6a15a6ca7b
@ -39,13 +39,13 @@ class TestPhoneNumber:
|
|||||||
|
|
||||||
|
|
||||||
class TestAlphabet:
|
class TestAlphabet:
|
||||||
@pytest.mark.parametrize("valid", ["a", "abcde"])
|
@pytest.mark.parametrize("valid", ["a", "abcde", "hi mark", "cloud9", "niña"])
|
||||||
def test_Alphabet_accepts_letters(self, valid, dummy_form, dummy_field):
|
def test_Alphabet_accepts_letters(self, valid, dummy_form, dummy_field):
|
||||||
validator = Alphabet()
|
validator = Alphabet()
|
||||||
dummy_field.data = valid
|
dummy_field.data = valid
|
||||||
validator(dummy_form, dummy_field)
|
validator(dummy_form, dummy_field)
|
||||||
|
|
||||||
@pytest.mark.parametrize("invalid", ["", "hi mark", "cloud9"])
|
@pytest.mark.parametrize("invalid", [""])
|
||||||
def test_Alphabet_rejects_non_letters(self, invalid, dummy_form, dummy_field):
|
def test_Alphabet_rejects_non_letters(self, invalid, dummy_form, dummy_field):
|
||||||
validator = Alphabet()
|
validator = Alphabet()
|
||||||
dummy_field.data = invalid
|
dummy_field.data = invalid
|
||||||
|
Loading…
x
Reference in New Issue
Block a user