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

Unified Diff: appengine/swarming/handlers_test.py

Issue 1926443003: swarming: read configs from luci-config (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@master
Patch Set: unlint Created 4 years, 8 months 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
Index: appengine/swarming/handlers_test.py
diff --git a/appengine/swarming/handlers_test.py b/appengine/swarming/handlers_test.py
index 453e630b4baf44da25993dac6553be408d325dae..0cee978534fa03773b17f91e0d1550944b85c94b 100755
--- a/appengine/swarming/handlers_test.py
+++ b/appengine/swarming/handlers_test.py
@@ -416,36 +416,7 @@ class FrontendAdminTest(AppTestBase):
def test_config(self):
self.set_as_admin()
- resp = self.app.get('/restricted/config')
- # TODO(maruel): Use beautifulsoup?
- params = {
- 'bot_death_timeout_secs': 10*60,
- 'google_analytics': 'foobar',
- 'keyid': str(config.settings().key.integer_id()),
- 'reusable_task_age_secs': 30,
- 'xsrf_token': self.get_xsrf_token(),
- }
- self.assertEqual('', config.settings().google_analytics)
- resp = self.app.post('/restricted/config', params)
- self.assertNotIn('Update conflict', resp)
- self.assertEqual('foobar', config.settings().google_analytics)
- self.assertIn('foobar', self.app.get('/').body)
-
- def test_config_conflict(self):
- self.set_as_admin()
- resp = self.app.get('/restricted/config')
- # TODO(maruel): Use beautifulsoup?
- params = {
- 'bot_death_timeout_secs': 10*60,
- 'google_analytics': 'foobar',
- 'keyid': str(config.settings().key.integer_id() - 1),
- 'reusable_task_age_secs': 30,
- 'xsrf_token': self.get_xsrf_token(),
- }
- self.assertEqual('', config.settings().google_analytics)
- resp = self.app.post('/restricted/config', params)
- self.assertIn('Update conflict', resp)
- self.assertEqual('', config.settings().google_analytics)
+ self.app.get('/restricted/config')
class BackendTest(AppTestBase):

Powered by Google App Engine
This is Rietveld 408576698