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

Unified Diff: appengine/chrome_infra_mon_proxy/test/common_test.py

Issue 928043005: Monitoring proxy for time series data (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Responded to comments Created 5 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/chrome_infra_mon_proxy/test/common_test.py
diff --git a/appengine/chrome_infra_mon_proxy/test/common_test.py b/appengine/chrome_infra_mon_proxy/test/common_test.py
new file mode 100644
index 0000000000000000000000000000000000000000..e64a892fb01e2eac0b163a8185385020f6eba121
--- /dev/null
+++ b/appengine/chrome_infra_mon_proxy/test/common_test.py
@@ -0,0 +1,36 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import logging
+import os
+import webapp2
+
+from testing_utils import testing
+
+import common
+
+
+class TestHandler(common.BaseHandler):
+ def get(self):
+ self.render_response('main.html', title='Test')
+
+
+_app = webapp2.WSGIApplication([(r'/', TestHandler)], debug=True)
+
+
+class CommonTest(testing.AppengineTestCase):
+
+ @property
+ def app_module(self):
+ return _app
+
+ def test_payload_stats(self):
+ data = 'c00kedbeef'
+ res = "type=<type 'str'>, 10 bytes, md5=407ab662183805731696989975459a9f"
+ self.assertEquals(res, common.payload_stats(data))
+
+ def test_base_handler(self):
+ response = self.test_app.get('/')
+ logging.info('response = %s', response)
+ self.assertEquals(200, response.status_int)

Powered by Google App Engine
This is Rietveld 408576698