Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Unified Diff: appengine/swarming/handlers_api_test.py

Issue 1454913002: Get rid of usage of old Swarming API in tests. (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: . Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | appengine/swarming/handlers_bot_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/handlers_api_test.py
diff --git a/appengine/swarming/handlers_api_test.py b/appengine/swarming/handlers_api_test.py
index 92327e783c0590ecfa0dc9cd47f1bbeef9eacdc3..fc4a6fcdae880677d1f0b340ea2a719ca4130db8 100755
--- a/appengine/swarming/handlers_api_test.py
+++ b/appengine/swarming/handlers_api_test.py
@@ -46,6 +46,16 @@ class ClientApiTest(test_env_handlers.AppTestBase):
# Client API test cases run by default as user.
self.set_as_user()
+ def get_client_token(self):
+ """Gets the XSRF token for client after handshake."""
+ headers = {'X-XSRF-Token-Request': '1'}
+ params = {}
+ response = self.app.post_json(
+ '/swarming/api/v1/client/handshake',
+ headers=headers,
+ params=params).json
+ return response['xsrf_token'].encode('ascii')
+
def test_list(self):
self.set_as_anonymous()
response = self.app.get('/swarming/api/v1/client/list').json
« no previous file with comments | « no previous file | appengine/swarming/handlers_bot_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698