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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_github_unittest.py

Issue 2557963002: Convert WPT export usage of httplib2 to urllib2 (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_github.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import base64 5 import base64
6 import unittest 6 import unittest
7 from webkitpy.common.host_mock import MockHost 7 from webkitpy.common.host_mock import MockHost
8 from webkitpy.w3c.wpt_github import WPTGitHub 8 from webkitpy.w3c.wpt_github import WPTGitHub
9 9
10 10
(...skipping 20 matching lines...) Expand all
31 self.host = MockHost() 31 self.host = MockHost()
32 self.host.environ['GH_USER'] = 'rutabaga' 32 self.host.environ['GH_USER'] = 'rutabaga'
33 self.host.environ['GH_TOKEN'] = 'deadbeefcafe' 33 self.host.environ['GH_TOKEN'] = 'deadbeefcafe'
34 self.wpt_github = WPTGitHub(self.host) 34 self.wpt_github = WPTGitHub(self.host)
35 35
36 def test_properties(self): 36 def test_properties(self):
37 self.assertEqual(self.wpt_github.user, 'rutabaga') 37 self.assertEqual(self.wpt_github.user, 'rutabaga')
38 self.assertEqual(self.wpt_github.token, 'deadbeefcafe') 38 self.assertEqual(self.wpt_github.token, 'deadbeefcafe')
39 39
40 def test_auth_token(self): 40 def test_auth_token(self):
41 expected = base64.encodestring('rutabaga:deadbeefcafe') 41 expected = base64.encodestring('rutabaga:deadbeefcafe').strip()
42 self.assertEqual(self.wpt_github.auth_token(), expected) 42 self.assertEqual(self.wpt_github.auth_token(), expected)
OLDNEW
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_github.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698