Esempio n. 1
0
 def test_not_allowed_chars(self):
     """Test VALIDATOR NotAllowedChars works."""
     with self.flask_app.test_request_context('/'):
         f = LoginForm()
         f.email.data = self.email_addr + "$"
         u = validator.NotAllowedChars()
         u.__call__(f, f.email)
Esempio n. 2
0
 def test_comma_separated_integers(self):
     """Test VALIDATOR CommaSeparatedIntegers works."""
     with self.flask_app.test_request_context('/'):
         f = LoginForm()
         f.email.data = '1 2 3'
         u = validator.CommaSeparatedIntegers()
         u.__call__(f, f.email)
Esempio n. 3
0
 def test_unique(self):
     """Test VALIDATOR Unique works."""
     with self.flask_app.test_request_context('/'):
         f = LoginForm()
         f.email.data = self.email_addr
         u = validator.Unique(user_repo.get_by, 'email_addr')
         u.__call__(f, f.email)