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

Side by Side Diff: appengine/chromium_cq_status/tests/utils_test.py

Issue 499103002: Make test_results deployable again. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: merge to ToT Created 6 years, 3 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
« no previous file with comments | « appengine/chromium_cq_status/tests/query_test.py ('k') | appengine/path_mangler_hack.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 sys
6 import os 5 import os
7 6
8 # App Engine source file imports must be relative to their app's root. 7 from appengine.path_mangler_hack import PathMangler
9 sys.path.append(os.path.dirname(os.path.dirname(__file__))) 8 with PathMangler(os.path.dirname(os.path.dirname(__file__))):
10 9 from appengine.utils import testing
11 from appengine.utils import testing 10 from appengine.chromium_cq_status.shared import utils
12 from appengine.chromium_cq_status.shared import utils
13 11
14 class TestUtils(testing.AppengineTestCase): 12 class TestUtils(testing.AppengineTestCase):
15 def test_filter_dict(self): 13 def test_filter_dict(self):
16 self.assertEquals( 14 self.assertEquals(
17 {'b': 2, 'c': 3}, 15 {'b': 2, 'c': 3},
18 utils.filter_dict({'a': 1, 'b': 2, 'c': 3}, ('b', 'c', 'd'))) 16 utils.filter_dict({'a': 1, 'b': 2, 'c': 3}, ('b', 'c', 'd')))
19 17
20 def test_is_valid_user(self): 18 def test_is_valid_user(self):
21 self.assertFalse(utils.is_valid_user()) 19 self.assertFalse(utils.is_valid_user())
22 20
(...skipping 15 matching lines...) Expand all
38 self.mock_current_user('fake', 'fake@chromium.orgg') 36 self.mock_current_user('fake', 'fake@chromium.orgg')
39 self.assertFalse(utils.is_valid_user()) 37 self.assertFalse(utils.is_valid_user())
40 38
41 self.mock_current_user('fake', 'fake@chromium_org') 39 self.mock_current_user('fake', 'fake@chromium_org')
42 self.assertFalse(utils.is_valid_user()) 40 self.assertFalse(utils.is_valid_user())
43 41
44 def test_password_sha1(self): 42 def test_password_sha1(self):
45 self.assertEquals( 43 self.assertEquals(
46 '018d644a17b71b65cef51fa0a523a293f2b3266f', 44 '018d644a17b71b65cef51fa0a523a293f2b3266f',
47 utils.password_sha1('cq')) 45 utils.password_sha1('cq'))
OLDNEW
« no previous file with comments | « appengine/chromium_cq_status/tests/query_test.py ('k') | appengine/path_mangler_hack.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698