mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-22 17:00:17 +08:00
apiserver: add interface /api/token
This commit is contained in:
@@ -128,3 +128,10 @@ class TestApiServer(ApiServerUnittest):
|
||||
resp = self.api_client.post(url, json=expected_response)
|
||||
self.assertIn('abc', resp.headers)
|
||||
self.assertIn('123', resp.headers['abc'])
|
||||
|
||||
def test_get_token(self):
|
||||
url = "%s/api/token" % self.host
|
||||
resp = self.api_client.get(url)
|
||||
resp_json = resp.json()
|
||||
self.assertTrue(resp_json["success"])
|
||||
self.assertEqual(len(resp_json["token"]), 8)
|
||||
|
||||
Reference in New Issue
Block a user