Commit 82859e754ced5bb27a3915caed906bf7ecdf3d78
1 parent
05417135
Exists in
master
and in
32 other branches
Add Mock to validate social(facebook,twitter)names
Signed-off-by: Gustavo Jaruga <darksshades@gmail.com>
Showing
1 changed file
with
4 additions
and
0 deletions
Show diff stats
colab/accounts/tests/test_user.py
@@ -2,7 +2,10 @@ | @@ -2,7 +2,10 @@ | ||
2 | Test User class. | 2 | Test User class. |
3 | Objective: Test parameters, and behavior. | 3 | Objective: Test parameters, and behavior. |
4 | """ | 4 | """ |
5 | +import mock | ||
6 | + | ||
5 | from colab.accounts.models import User | 7 | from colab.accounts.models import User |
8 | +from colab.accounts import forms as accounts_forms | ||
6 | from django.test import TestCase, Client | 9 | from django.test import TestCase, Client |
7 | 10 | ||
8 | 11 | ||
@@ -11,6 +14,7 @@ class UserTest(TestCase): | @@ -11,6 +14,7 @@ class UserTest(TestCase): | ||
11 | def setUp(self): | 14 | def setUp(self): |
12 | self.user = self.create_user() | 15 | self.user = self.create_user() |
13 | self.client = Client() | 16 | self.client = Client() |
17 | + accounts_forms.validate_social_account = mock.Mock(return_value=True) | ||
14 | 18 | ||
15 | def tearDown(self): | 19 | def tearDown(self): |
16 | pass | 20 | pass |