1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 14:50:29 +00:00

Merge pull request #2423 from haiwen/6.3-fix_restframework

Upgrade rest_framework to 3.3.3 to fix html render error in web api
This commit is contained in:
zheng xie
2018-10-08 11:17:35 +08:00
committed by GitHub
2 changed files with 12 additions and 1 deletions

View File

@@ -7,7 +7,7 @@ Django==1.11.15
django-compressor==2.2
django-post-office==3.0.4
django-statici18n==1.7.0
djangorestframework==3.3.1
djangorestframework==3.3.3
git+git://github.com/haiwen/django-constance.git@8508ff29141732190faff51d5c2b5474da297732#egg=django-constance[database]
openpyxl==2.3.0
pytz==2015.7

11
tests/api/test_ping.py Normal file
View File

@@ -0,0 +1,11 @@
from seahub.test_utils import BaseTestCase
class PingTest(BaseTestCase):
def test_can_ping(self):
resp = self.client.get('/api2/ping/')
self.assertEqual(200, resp.status_code)
def test_html_ping(self):
headers = {'HTTP_ACCEPT': 'text/html'}
resp = self.client.get('/api2/ping/', **headers)
self.assertEqual(200, resp.status_code)