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:
0
tests/seahub/profile/__init__.py
Normal file
0
tests/seahub/profile/__init__.py
Normal file
0
tests/seahub/profile/views/__init__.py
Normal file
0
tests/seahub/profile/views/__init__.py
Normal file
24
tests/seahub/profile/views/test_profile.py
Normal file
24
tests/seahub/profile/views/test_profile.py
Normal 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
|
Reference in New Issue
Block a user