Пример #1
0
    def test_check_email_valid_string_expected_True(self):
        string = "*****@*****.**"

        actual = Validator.check_email(string)
        expected = True

        self.assertEqual(actual, expected)
Пример #2
0
    def test_check_length_string_is_empty_expected_False(self):
        string = ""

        actual = Validator.check_length(string, 3, 18)
        expected = False

        self.assertEqual(actual, expected)
Пример #3
0
    def test_check_email_string_is_empty_expected_False(self):
        string = ""

        actual = Validator.check_email(string)
        expected = False

        self.assertEqual(actual, expected)
Пример #4
0
    def test_check_length_valid_string_expected_True(self):
        string = "Course Work"

        actual = Validator.check_length(string, 3, 20)
        expected = True

        self.assertEqual(actual, expected)
Пример #5
0
    def test_check_for_Latin_letters_valid_string_expected_True(self):
        string = 'qwerty'

        actual = Validator.check_for_Latin_letters(string)
        expected = True

        self.assertEqual(actual, expected)
Пример #6
0
    def test_check_for_Latin_letters_invalid_string_expected_False(self):
        string = '123'

        actual = Validator.check_for_Latin_letters(string)
        expected = False

        self.assertEqual(actual, expected)
Пример #7
0
    def test_check_phone_number_valid_string_expected_True(self):
        string = "80445789865"

        actual = Validator.check_phone_number(string)
        expected = True

        self.assertEqual(actual, expected)
Пример #8
0
    def test_check_phone_number_invalid_string_expected_False(self):
        string = "kristina_mironenko"

        actual = Validator.check_phone_number(string)
        expected = False

        self.assertEqual(actual, expected)
Пример #9
0
    def test_check_str_is_not_none_and_not_empty_valid_string_expected_True(
            self):
        string = 'Course Work'

        actual = Validator.check_str_is_not_none_and_not_empty(string)
        expected = True

        self.assertEqual(actual, expected)
Пример #10
0
    def test_check_str_is_not_none_and_not_empty_empty_string_expected_False(
            self):
        string = ''

        actual = Validator.check_str_is_not_none_and_not_empty(string)
        expected = False

        self.assertEqual(actual, expected)
Пример #11
0
    def test_check_login(self, input_string, expected):

        actual = Validator.check_login(input_string)

        self.assertEqual(actual, expected)
    def test_check_on_figures(self, input_string, expected):

        actual = Validator.check_on_figures(input_string)

        self.assertEqual(actual, expected)
    def test_check_for_Latin_letters(self, input_string, expected):

        actual = Validator.check_for_Latin_letters(input_string)

        self.assertEqual(actual, expected)
    def test_check_phone_number(self, input_string, expected):

        actual = Validator.check_phone_number(input_string)

        self.assertEqual(actual, expected)
    def test_check_length(self, input_string, min, max, expected):

        actual = Validator.check_length(input_string, min, max)

        self.assertEqual(actual, expected)
    def test_check_str_is_not_none_and_not_empty(self, input_string, expected):

        actual = Validator.check_str_is_not_none_and_not_empty(input_string)

        self.assertEqual(actual, expected)