1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-06-29 16:37:56 +00:00
seahub/tests/api/endpoints/test_repo_history.py
lian 132d181c3a update repo history api
add 'name' and 'contact_email' to result
2017-04-11 17:44:17 +08:00

24 lines
654 B
Python

import json
from django.core.urlresolvers import reverse
from seahub.test_utils import BaseTestCase
class RepoHistoryTest(BaseTestCase):
def setUp(self):
self.repo_id = self.repo.id
self.user_name = self.user.username
self.url = reverse('api-v2.1-repo-history', args=[self.repo_id])
def tearDown(self):
self.remove_repo()
self.remove_group()
def test_can_get(self):
self.login_as(self.user)
resp = self.client.get(self.url)
self.assertEqual(200, resp.status_code)
json_resp = json.loads(resp.content)
assert json_resp['data'][0]['email'] == self.user_name