def test_skype_validator(self): # space user = CtsUserFactory(skype='aaa aaa') with self.assertRaises(ValidationError): user.full_clean() # starts with non-letter user.skype = '$asdfasdf' with self.assertRaises(ValidationError): user.full_clean() # < 5 chars user.skype = 'asdff' with self.assertRaises(ValidationError): user.full_clean() # > 32 chars user.skype = ''.join(random.choice(string.lowercase) for i in range(33)) with self.assertRaises(ValidationError): user.full_clean() user.skype = ''.join(random.choice(string.lowercase) for i in range(10)) user.full_clean()
def test_skype_validator(self): # space user = CtsUserFactory(skype='aaa aaa') with self.assertRaises(ValidationError): user.full_clean() # starts with non-letter user.skype = '$asdfasdf' with self.assertRaises(ValidationError): user.full_clean() # < 5 chars user.skype = 'asdff' with self.assertRaises(ValidationError): user.full_clean() # > 32 chars user.skype = ''.join( random.choice(string.lowercase) for i in range(33)) with self.assertRaises(ValidationError): user.full_clean() user.skype = ''.join( random.choice(string.lowercase) for i in range(10)) user.full_clean()