Revision bd1548a7 invitations/tests.py
b/invitations/tests.py | ||
---|---|---|
16 | 16 |
source = SynnefoUser.objects.filter(auth_token = self.token)[0] |
17 | 17 |
invitations.add_invitation(source, "Test", "test@gmail.com") |
18 | 18 |
|
19 |
# Check whether the invited user has been added to the database |
|
19 | 20 |
added_user = SynnefoUser.objects.filter(name = "Test", |
20 | 21 |
uniq = "test@gmail.com") |
21 |
|
|
22 | 22 |
self.assertNotEquals(added_user, None) |
23 | 23 |
|
24 |
invitations.add_invitation(source, u'', "test@gmail.com") |
|
24 |
# Re-adding an existing invitation |
|
25 |
try: |
|
26 |
invitations.add_invitation(source, u'', "test@gmail.com") |
|
27 |
self.assertTrue(False) |
|
28 |
except invitations.AlreadyInvited: |
|
29 |
self.assertTrue(True) |
|
30 |
|
|
31 |
# |
Also available in: Unified diff