Commit ee075ec1aa719cb5f2b840d0a5afd52ad20a0680
1 parent
ae33d540
Exists in
master
and in
4 other branches
accounts: test validate_social_account method
Showing
1 changed file
with
13 additions
and
0 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,13 @@ |
| 1 | +from django.test import TestCase | |
| 2 | + | |
| 3 | +from ..utils.validators import validate_social_account | |
| 4 | + | |
| 5 | + | |
| 6 | +class TestValidators(TestCase): | |
| 7 | + | |
| 8 | + def test_validate_social_account_with_fake_account(self): | |
| 9 | + self.assertFalse(validate_social_account('john-fake', | |
| 10 | + 'http://twitter.com')) | |
| 11 | + | |
| 12 | + def test_validate_social_account(self): | |
| 13 | + self.assertTrue(validate_social_account('john', 'http://twitter.com')) | ... | ... |