Exemple #1
0
    def test_username_validation_long(self):
        name = "a"
        for i in range(255):
            name = name + "f"

        res = views.username_validation(name)

        self.assertEqual(res, False)
Exemple #2
0
    def test_username_validation_void(self):
        name = ""

        res = views.username_validation(name)

        self.assertEqual(res, False)
Exemple #3
0
    def test_username_validation_success(self):
        name = "vasyaf.+-_"

        res = views.username_validation(name)

        self.assertEqual(res, True)
Exemple #4
0
    def test_username_validation_forbidden_symbol(self):
        name = "oed30-2*"

        res = views.username_validation(name)

        self.assertEqual(res, False)
Exemple #5
0
    def test_username_validation_short(self):
        name = "as"

        res = views.username_validation(name)

        self.assertEqual(res, False)