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

Side by Side Diff: appengine/components/test_support/test_env.py

Issue 1860863002: Update copyright notice from Swarming to LUCI; add AUTHORS and CONTRIBUTORS. (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: . Created 4 years, 8 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
1 # Copyright 2013 The Swarming Authors. All rights reserved. 1 # Copyright 2013 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed by the Apache v2.0 license that can be 2 # Use of this source code is governed by the Apache v2.0 license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 import sys 6 import sys
7 7
8 # /appengine/ 8 # /appengine/
9 ROOT_DIR = os.path.dirname( 9 ROOT_DIR = os.path.dirname(
10 os.path.dirname(os.path.realpath(os.path.abspath(__file__)))) 10 os.path.dirname(os.path.realpath(os.path.abspath(__file__))))
11 11
12 _INITIALIZED = False 12 _INITIALIZED = False
13 13
14 14
15 def setup_test_env(): 15 def setup_test_env():
16 """Sets up App Engine/Django test environment.""" 16 """Sets up App Engine/Django test environment."""
17 global _INITIALIZED 17 global _INITIALIZED
18 if _INITIALIZED: 18 if _INITIALIZED:
19 raise Exception('Do not call test_env.setup_test_env() twice.') 19 raise Exception('Do not call test_env.setup_test_env() twice.')
20 _INITIALIZED = True 20 _INITIALIZED = True
21 21
22 # For 'from components import ...' and 'from test_support import ...'. 22 # For 'from components import ...' and 'from test_support import ...'.
23 sys.path.insert(0, ROOT_DIR) 23 sys.path.insert(0, ROOT_DIR)
24 sys.path.insert(0, os.path.join(ROOT_DIR, '..', 'third_party_local')) 24 sys.path.insert(0, os.path.join(ROOT_DIR, '..', 'third_party_local'))
25 25
26 from tool_support import gae_sdk_utils 26 from tool_support import gae_sdk_utils
27 gae_sdk_utils.setup_gae_env() 27 gae_sdk_utils.setup_gae_env()
28 gae_sdk_utils.setup_env(None, 'sample-app', 'v1a', None) 28 gae_sdk_utils.setup_env(None, 'sample-app', 'v1a', None)
OLDNEW
« no previous file with comments | « appengine/components/test_support/test_case.py ('k') | appengine/components/tests/endpoints_smoke_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698