1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-18 00:00:00 +00:00

[test] Add test case for profile

This commit is contained in:
zhengxie
2015-06-27 17:22:28 +08:00
parent f807056f20
commit 512d522b7a
3 changed files with 24 additions and 0 deletions

View File

View File

View File

@@ -0,0 +1,24 @@
from django.core.urlresolvers import reverse
from django.test import TestCase
from seahub.base.accounts import User
from seahub.test_utils import Fixtures
from seaserv import ccnet_threaded_rpc
class DeleteUserAccountTest(TestCase, Fixtures):
def test_can_delete(self):
self.client.post(
reverse('auth_login'), {'username': self.user.username,
'password': 'secret'}
)
username = self.user.username
resp = self.client.post(
reverse('delete_user_account')
)
self.assertEqual(302, resp.status_code)
assert len(ccnet_threaded_rpc.search_emailusers('DB', username, -1, -1)) == 0