def setUp(self):
        # Load environment variable
        load_test_env()

        # Launch the webserver
        cmd = "screen -dmS 'test' bash -c"
        cmd += " 'cd ..; foreman start; exec bash'"
        os.system(cmd)

        chromedriver = "/Applications/chromedriver"
        os.environ["webdriver.chrome.driver"] = chromedriver
        self.driver = webdriver.Chrome(chromedriver)
        self.driver.get("localhost:5000")
import sys
import os

try:
    with open("../.env","r") as f:
        lines = f.readlines()
        for line in lines:
            if line.startswith('gmail_API_KEY'):
                os.environ['gmail_API_KEY'] = line.split("=")[1].replace('"', '').replace("\n","")
            if line.startswith('gmail_API_SECRET'):
                os.environ['gmail_API_SECRET'] = line.split("=")[1].replace('"', '').replace("\n","")
            if line.startswith('giantbomb_API_KEY'):
                os.environ['giantbomb_API_KEY'] = line.split("=")[1].replace('"', '').replace("\n","")
    
    from tests_env import load_test_env
    load_test_env()
    
except:
    pass

cov = coverage.Coverage(include=["apps/*"], omit=["*__init__.py"])
cov.start()

## Controllers
from behave.__main__ import main as behave_main

# API tests
#from tests.apps.gaming_challenges.controllers.api.test_games import ... #nopep8
#from tests.apps.gaming_challenges.controllers.api.test_ranking import Test_ranking_api #nopep8
#from tests.apps.gaming_challenges.controllers.api.test_users import ... #nopep8