mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-08 18:30:53 +00:00
added /api2/server-info/ endpoint
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import unittest
|
||||
import requests
|
||||
from tests.api.apitestbase import ApiTestBase
|
||||
from tests.api.urls import LIST_GROUP_AND_CONTACTS_URL
|
||||
from tests.api.urls import LIST_GROUP_AND_CONTACTS_URL, SERVER_INFO_URL
|
||||
|
||||
class MiscApiTest(ApiTestBase):
|
||||
def test_list_group_and_contacts(self):
|
||||
@@ -12,3 +13,10 @@ class MiscApiTest(ApiTestBase):
|
||||
self.assertIsInstance(res['groups'], list)
|
||||
self.assertIsNotNone(res['gmsgnum'])
|
||||
self.assertIsNotNone(res['newreplies'])
|
||||
|
||||
def test_server_info(self):
|
||||
r = requests.get(SERVER_INFO_URL)
|
||||
r.raise_for_status()
|
||||
info = r.json()
|
||||
self.assertTrue('version' in info)
|
||||
self.assertTrue('seafile-basic' in info['features'])
|
||||
|
Reference in New Issue
Block a user