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

Side by Side Diff: appengine/findit/common/test/base_handler_test.py

Issue 2344443005: [Findit] Factoring the gitiles (etc) stuff out into its own directory (Closed)
Patch Set: reordering imports Created 4 years, 1 month 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/findit/common/rietveld.py ('k') | appengine/findit/common/test/blame_test.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 mock 5 import mock
6 import re 6 import re
7 import urllib 7 import urllib
8 8
9 import webapp2 9 import webapp2
10 import webtest 10 import webtest
11 11
12 from google.appengine.api import users 12 from google.appengine.api import users
13 13
14 from testing_utils import testing 14 from testing_utils import testing
15 15
16 from common import base_handler 16 from common import base_handler
17 from common.base_handler import BaseHandler 17 from common.base_handler import BaseHandler, Permission
18 from common.base_handler import Permission
19 18
20 19
21 class PermissionLevelHandler(BaseHandler): 20 class PermissionLevelHandler(BaseHandler):
22 PERMISSION_LEVEL = Permission.ANYONE 21 PERMISSION_LEVEL = Permission.ANYONE
23 22
24 def HandleGet(self): 23 def HandleGet(self):
25 pass 24 pass
26 25
27 26
28 class PermissionTest(testing.AppengineTestCase): 27 class PermissionTest(testing.AppengineTestCase):
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 app_module = webapp2.WSGIApplication([ 255 app_module = webapp2.WSGIApplication([
257 ('/exception', InternalExceptionHandler), 256 ('/exception', InternalExceptionHandler),
258 ], debug=True) 257 ], debug=True)
259 258
260 def testInternalException(self): 259 def testInternalException(self):
261 self.assertRaisesRegexp( 260 self.assertRaisesRegexp(
262 webtest.app.AppError, 261 webtest.app.AppError,
263 re.compile('.*500 Internal Server Error.*An internal error occurred.*', 262 re.compile('.*500 Internal Server Error.*An internal error occurred.*',
264 re.MULTILINE | re.DOTALL), 263 re.MULTILINE | re.DOTALL),
265 self.test_app.get, '/exception') 264 self.test_app.get, '/exception')
OLDNEW
« no previous file with comments | « appengine/findit/common/rietveld.py ('k') | appengine/findit/common/test/blame_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698