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

Unified Diff: tools/telemetry/third_party/gsutil/third_party/httplib2/python2/httplib2/test/smoke_test.py

Issue 1258583006: Add gsutil 4.13 to telemetry/third_party (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undo all other changes so this just add gsutil to third_party Created 5 years, 5 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: tools/telemetry/third_party/gsutil/third_party/httplib2/python2/httplib2/test/smoke_test.py
diff --git a/tools/telemetry/third_party/gsutil/third_party/httplib2/python2/httplib2/test/smoke_test.py b/tools/telemetry/third_party/gsutil/third_party/httplib2/python2/httplib2/test/smoke_test.py
new file mode 100644
index 0000000000000000000000000000000000000000..9f1e6f01d6dacb3c28faa942853487bf21afd77e
--- /dev/null
+++ b/tools/telemetry/third_party/gsutil/third_party/httplib2/python2/httplib2/test/smoke_test.py
@@ -0,0 +1,23 @@
+import os
+import unittest
+
+import httplib2
+
+from httplib2.test import miniserver
+
+
+class HttpSmokeTest(unittest.TestCase):
+ def setUp(self):
+ self.httpd, self.port = miniserver.start_server(
+ miniserver.ThisDirHandler)
+
+ def tearDown(self):
+ self.httpd.shutdown()
+
+ def testGetFile(self):
+ client = httplib2.Http()
+ src = 'miniserver.py'
+ response, body = client.request('http://localhost:%d/%s' %
+ (self.port, src))
+ self.assertEqual(response.status, 200)
+ self.assertEqual(body, open(os.path.join(miniserver.HERE, src)).read())

Powered by Google App Engine
This is Rietveld 408576698