mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-15 23:00:57 +00:00
improved tests
This commit is contained in:
14
tests/api/test_ping.py
Normal file
14
tests/api/test_ping.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from apitestbase import PING_URL
|
||||
import requests, unittest
|
||||
|
||||
class PingApiTestCase(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.res = requests.get(PING_URL)
|
||||
|
||||
def test_ping_api(self):
|
||||
self.assertEqual(self.res.status_code, 200)
|
||||
self.assertRegexpMatches(self.res.text, u'"pong"')
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main(verbosity=2)
|
Reference in New Issue
Block a user