~canonical-platform-qa/snappy-ecosystem-tests/fixing_ci

« back to all changes in this revision

Viewing changes to snappy_ecosystem_tests/utils/storeconfig.py

  • Committer: Heber Parrucci
  • Date: 2017-02-13 16:00:04 UTC
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: heber.parrucci@canonical.com-20170213160004-oe9fnfkd6foqllae
Changing runner for pytest to aviod the plugins issues in nose2 using testtools.
Making pylint more strict: fail with Warnings messages.
Refactoring global variables to use Singletons instead.
Updating README.rst with the new runner options

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
import os
24
24
 
25
 
from snappy_ecosystem_tests.commons.config import get_config
 
25
from snappy_ecosystem_tests.commons.config import CONFIG_STACK
26
26
from snappy_ecosystem_tests.utils.test_data import get_store_user
27
27
 
28
 
URL_WEB_STORE_PRODUCTION = get_config().get('web-ui', 'production_url')
29
 
URL_WEB_STORE_STAGING = get_config().get('web-ui', 'stage_url')
 
28
URL_WEB_STORE_PRODUCTION = CONFIG_STACK.config.get('web-ui', 'production_url')
 
29
URL_WEB_STORE_STAGING = CONFIG_STACK.config.get('web-ui', 'stage_url')
30
30
 
31
31
 
32
32
def get_store_credentials():
54
54
    if that env variable is not set, then it returns staging as default
55
55
    :return: current configured store environment
56
56
    """
57
 
    return get_config().get('store', 'environment', os.getenv('TEST_STORE', 'staging'))
 
57
    return CONFIG_STACK.config.get('store', 'environment', os.getenv('TEST_STORE', 'staging'))