Пример #1
0
    def test_validate_only_if_not_none(self):
        field = PasswordField(required=False)

        expect(field.validate(None)).to_be_true()
Пример #2
0
    def test_validate_only_if_not_none(self):
        field = PasswordField(required=False)

        expect(field.validate(None)).to_be_true()
Пример #3
0
    def test_validate_enforces_password_type(self):
        field = PasswordField()

        expect(field.validate(1)).to_be_false()
Пример #4
0
    def test_validate_enforces_password_type(self):
        field = PasswordField()

        expect(field.validate(1)).to_be_false()