Exemplo n.º 1
0
 def test_correct_mail_with_more_than_one_at_sign(self):
     statement = FormatValidators.validate_email("user@@server.com")
     self.assertFalse(statement)
Exemplo n.º 2
0
 def test_last_mo_sickness_is_true_n(self):
     statement = FormatValidators.validate_sick("n")
     self.assertEqual("n", statement)
Exemplo n.º 3
0
 def test_last_mo_sickness_is_entrirely_wrong(self):
     statement = FormatValidators.validate_sick("nope")
     self.assertFalse(statement)
Exemplo n.º 4
0
 def test_given_weight_is_not_acceptable_451(self):
     statement = FormatValidators.validate_weight("451")
     self.assertFalse(statement)
Exemplo n.º 5
0
 def test_gender_is_male(self):
     statement = FormatValidators.validate_gender("m")
     self.assertEqual("m", statement)
Exemplo n.º 6
0
 def test_birthday_from_console_is_invalid(self):
     statement = FormatValidators.validate_date("852.02.03")
     self.assertFalse(statement)
Exemplo n.º 7
0
 def test_id_is_is_null(self):
     statement = FormatValidators.validate_id("")
     self.assertFalse(statement)
Exemplo n.º 8
0
 def test_birthday_from_console_is_valid(self):
     statement = FormatValidators.validate_date("1987.07.06")
     self.assertTrue(statement)
Exemplo n.º 9
0
 def test_given_input_is_digit(self):
     statement = FormatValidators.validate_inputisdigit("5")
     self.assertEqual("5", statement)
Exemplo n.º 10
0
 def test_phone_numer_with_longer_number(self):
     statement = FormatValidators.validate_mobile_number("+36302133333333333333333333333")
     self.assertFalse(statement)
Exemplo n.º 11
0
 def test_phone_numer_is_empty_string(self):
     statement = FormatValidators.validate_mobile_number("")
     self.assertFalse(statement)
Exemplo n.º 12
0
 def test_phone_numer_with_alphanumeric_char(self):
     statement = FormatValidators.validate_mobile_number("0670472762W")
     self.assertFalse(statement)
Exemplo n.º 13
0
 def test_06prefix_correct_phone_number(self):
     statement = FormatValidators.validate_mobile_number("06704727622")
     self.assertEqual("06704727622", statement)
Exemplo n.º 14
0
 def test_email_starts_with_at_sign(self):
     statement = FormatValidators.validate_email("@server.com")
     self.assertFalse(statement)
Exemplo n.º 15
0
 def test_zip_longer_than_4_chars(self):
     statement = FormatValidators.validate_zip("3534123")
     self.assertFalse(statement)
Exemplo n.º 16
0
 def test_given_input_is_not_digit(self):
     statement = FormatValidators.validate_inputisdigit("H")
     self.assertFalse(statement)
Exemplo n.º 17
0
 def test_zip_starts_with_zero(self):
     statement = FormatValidators.validate_zip("0123")
     self.assertFalse(statement)
Exemplo n.º 18
0
 def test_given_input_is_empty_string(self):
     statement = FormatValidators.validate_inputisdigit("")
     self.assertFalse(statement)
Exemplo n.º 19
0
 def test_name_is_valid(self):
     statement = FormatValidators.validate_name("Sunny Diamond")
     self.assertEqual("Sunny Diamond", statement)
Exemplo n.º 20
0
 def test_address_len_is_greaterthanequal1_or_lessthanequal25(self):
     statement = FormatValidators.validate_address("Kazinczty street")
     self.assertEqual("Kazinczty street", statement)
Exemplo n.º 21
0
 def test_given_weight_is_acceptable(self):
     statement = FormatValidators.validate_weight("50")
     self.assertEqual("50", statement)
Exemplo n.º 22
0
 def test_address_longerthan25chars(self):
     statement = FormatValidators.validate_address("qqqqqqqqqqwwwwweeeeerrrrrd")
     self.assertFalse(statement)
Exemplo n.º 23
0
 def test_given_weight_is_not_isdigit(self):
     statement = FormatValidators.validate_id("ff")
     self.assertFalse(statement)
Exemplo n.º 24
0
 def test_address_is_empty_string(self):
     statement = FormatValidators.validate_address("")
     self.assertFalse(statement)
Exemplo n.º 25
0
 def test_gender_is_not_valid_2(self):
     statement = FormatValidators.validate_gender("boy")
     self.assertFalse(statement)
Exemplo n.º 26
0
 def test_zip_is_correct(self):
     statement = FormatValidators.validate_zip("3534")
     self.assertEqual("3534", statement)
Exemplo n.º 27
0
 def test_city_is_valid(self):
     statement = FormatValidators.validate_city("Miskolc")
     self.assertEqual("Miskolc", statement)
Exemplo n.º 28
0
 def test_zip_contains_letters(self):
     statement = FormatValidators.validate_zip("353A")
     self.assertFalse(statement)
Exemplo n.º 29
0
 def test_id_is_idcard(self):
     statement = FormatValidators.validate_id("123456AB")
     self.assertEqual("123456AB", statement)
Exemplo n.º 30
0
 def test_correct_mail_with_at_sign(self):
     statement = FormatValidators.validate_email("*****@*****.**")
     self.assertEqual("*****@*****.**", statement)