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

Side by Side Diff: third_party/httplib2/test/smoke_test.py

Issue 183793010: Added OAuth2 authentication to apply_issue (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Added another option Created 6 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 import os
2 import unittest
3
4 import httplib2
5
6 from httplib2.test import miniserver
7
8
9 class HttpSmokeTest(unittest.TestCase):
10 def setUp(self):
11 self.httpd, self.port = miniserver.start_server(
12 miniserver.ThisDirHandler)
13
14 def tearDown(self):
15 self.httpd.shutdown()
16
17 def testGetFile(self):
18 client = httplib2.Http()
19 src = 'miniserver.py'
20 response, body = client.request('http://localhost:%d/%s' %
21 (self.port, src))
22 self.assertEqual(response.status, 200)
23 self.assertEqual(body, open(os.path.join(miniserver.HERE, src)).read())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698