Commit fee0c86c5cc534958e85c2229a6a42701fdc465e
Committed by
Sergio Oliveira
1 parent
9d2fc3af
Exists in
master
and in
39 other branches
Create test for user.
Showing
1 changed file
with
44 additions
and
0 deletions
Show diff stats
@@ -0,0 +1,44 @@ | @@ -0,0 +1,44 @@ | ||
1 | +""" | ||
2 | +Test User class. | ||
3 | +Objective: Test parameters, and behavior. | ||
4 | +""" | ||
5 | +from colab.accounts.models import User | ||
6 | +from django.test import TestCase, Client | ||
7 | + | ||
8 | +class UserTest(TestCase): | ||
9 | + | ||
10 | + def setUp(self): | ||
11 | + self.user = User() | ||
12 | + pass | ||
13 | + | ||
14 | + def test_check_password(self): | ||
15 | + pass | ||
16 | + | ||
17 | + def test_get_absolute_url(self): | ||
18 | + pass | ||
19 | + | ||
20 | + def test_twitter_link(self): | ||
21 | + pass | ||
22 | + | ||
23 | + def test_facebook_link(self): | ||
24 | + pass | ||
25 | + | ||
26 | + def test_mailinglist(self): | ||
27 | + pass | ||
28 | + | ||
29 | + def test_update_subscription(self): | ||
30 | + pass | ||
31 | + | ||
32 | + def test_save(self): | ||
33 | + username_test = "USERtestCoLaB" | ||
34 | + self.user.username = username_test | ||
35 | + self.user.set_password("123colab4") | ||
36 | + self.user.email = "usertest@colab.com.br" | ||
37 | + self.user.id = 1 | ||
38 | + self.user.save() | ||
39 | + | ||
40 | + user_db = User.objects.get(id=1) | ||
41 | + self.assertEqual(user_db.username, username_test.lower()) | ||
42 | + self.user.delete() | ||
43 | + | ||
44 | + |