Sha256: 451a2468d98a7f4ea8eea4ab7b4f39809b9d7e2f5e29a99113617e8cf759ea7a

Contents?: true

Size: 934 Bytes

Versions: 4

Compression:

Stored size: 934 Bytes

Contents

import os
import functools

live_connection = False
mturk_host = 'mechanicalturk.sandbox.amazonaws.com'
external_url = 'http://www.example.com/'


SetHostMTurkConnection = None

def config_environment():
    global SetHostMTurkConnection
    try:
            local = os.path.join(os.path.dirname(__file__), 'local.py')
            execfile(local)
    except:
            pass

    if live_connection:
            #TODO: you must set the auth credentials to something valid
            from boto.mturk.connection import MTurkConnection
    else:
            # Here the credentials must be set, but it doesn't matter what
            #  they're set to.
            os.environ.setdefault('AWS_ACCESS_KEY_ID', 'foo')
            os.environ.setdefault('AWS_SECRET_ACCESS_KEY', 'bar')
            from mocks import MTurkConnection
    SetHostMTurkConnection = functools.partial(MTurkConnection, host=mturk_host)

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
googlecloud-0.0.7 packages/gsutil/boto/tests/mturk/_init_environment.py
gcloud-0.0.7 packages/gsutil/boto/tests/mturk/_init_environment.py
googlecloud-0.0.6 packages/gsutil/boto/tests/mturk/_init_environment.py
gcloud-0.0.6 packages/gsutil/boto/tests/mturk/_init_environment.py