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

Side by Side Diff: third_party/gsutil/boto/tests/mturk/_init_environment.py

Issue 12317103: Added gsutil to depot tools (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: added readme Created 7 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 functools
3
4 live_connection = False
5 mturk_host = 'mechanicalturk.sandbox.amazonaws.com'
6 external_url = 'http://www.example.com/'
7
8
9 SetHostMTurkConnection = None
10
11 def config_environment():
12 global SetHostMTurkConnection
13 try:
14 local = os.path.join(os.path.dirname(__file__), 'local.py')
15 execfile(local)
16 except:
17 pass
18
19 if live_connection:
20 #TODO: you must set the auth credentials to something valid
21 from boto.mturk.connection import MTurkConnection
22 else:
23 # Here the credentials must be set, but it doesn't matter what
24 # they're set to.
25 os.environ.setdefault('AWS_ACCESS_KEY_ID', 'foo')
26 os.environ.setdefault('AWS_SECRET_ACCESS_KEY', 'bar')
27 from mocks import MTurkConnection
28 SetHostMTurkConnection = functools.partial(MTurkConnection, host=mturk_host)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698