From ee075ec1aa719cb5f2b840d0a5afd52ad20a0680 Mon Sep 17 00:00:00 2001 From: Lucas Kanashiro Date: Mon, 16 Nov 2015 16:10:13 -0200 Subject: [PATCH] accounts: test validate_social_account method --- colab/accounts/tests/test_utils_validators.py | 13 +++++++++++++ 1 file changed, 13 insertions(+), 0 deletions(-) create mode 100644 colab/accounts/tests/test_utils_validators.py diff --git a/colab/accounts/tests/test_utils_validators.py b/colab/accounts/tests/test_utils_validators.py new file mode 100644 index 0000000..7b7f972 --- /dev/null +++ b/colab/accounts/tests/test_utils_validators.py @@ -0,0 +1,13 @@ +from django.test import TestCase + +from ..utils.validators import validate_social_account + + +class TestValidators(TestCase): + + def test_validate_social_account_with_fake_account(self): + self.assertFalse(validate_social_account('john-fake', + 'http://twitter.com')) + + def test_validate_social_account(self): + self.assertTrue(validate_social_account('john', 'http://twitter.com')) -- libgit2 0.21.2