コード例 #1
0
ファイル: test_helper.py プロジェクト: kaze/pyenv
 def setUp(self):
     self.env_file_path = 'tests/fixtures/.env'
     self.env = Environment(env_file=self.env_file_path)
     with open(self.env_file_path, 'w') as envfile:
         envfile.write(env_content)
     self.env.set_environment()
     self.settings = self.env.get_app_settings()
コード例 #2
0
ファイル: test_helper.py プロジェクト: kaze/pyenv
class EnvironmentBaseTest(unittest.TestCase):

    def setUp(self):
        self.env_file_path = 'tests/fixtures/.env'
        self.env = Environment(env_file=self.env_file_path)
        with open(self.env_file_path, 'w') as envfile:
            envfile.write(env_content)
        self.env.set_environment()
        self.settings = self.env.get_app_settings()

    def tearDown(self):
        os.environ['APP_ENV'] = ''
        os.environ['APP_ROOT'] = ''
        os.environ['NONEXISTENT_SETTING'] = ''
        os.environ['EXISTENT_SETTING'] = ''
        os.environ['TEST_VARS'] = ''