1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-18 17:22:05 +00:00
seahub/tests/integration_api/authping.py

17 lines
451 B
Python
Raw Normal View History

2014-08-27 09:13:05 +00:00
from integration_api import AUTH_PING_URL, get_authed_instance
2014-08-27 03:08:39 +00:00
import unittest
class AuthPingApiTestCase(unittest.TestCase):
def setUp(self):
2014-08-27 09:13:05 +00:00
self.requests = get_authed_instance()
2014-08-27 03:08:39 +00:00
self.assertIsNotNone(self.requests)
def testAuthPingApi(self):
2014-08-27 09:13:05 +00:00
res = self.requests.get(AUTH_PING_URL)
2014-08-27 03:08:39 +00:00
self.assertEqual(res.status_code, 200)
self.assertRegexpMatches(res.text, u'"pong"')
if __name__ == '__main__':
unittest.main(verbosity=2)