Esempio n. 1
0
 def test_app_initialization_notset_env_variables(self):
     item = {
         'username': '******',
         'password': '******'
     }
     crt_item = fillEnvironmentVariables(item)
     self.assertTrue(not crt_item)
 def test_app_initialization_notset_env_variables(self):
     item = {
         "username": "******",
         "password": "******"
     }
     crt_item = fillEnvironmentVariables(item)
     self.assertTrue(not crt_item)
 def test_app_initialization_set_env_variables(self):
     os.environ.update({'REUTERS_USERNAME': '******', 'REUTERS_PASSWORD': '******'})
     item = {'username': '******', 'password': '******'}
     crt_item = fillEnvironmentVariables(item)
     self.assertTrue(crt_item['username'] == 'r_username')
     self.assertTrue(crt_item['password'] == 'r_password')
     os.environ.pop('REUTERS_USERNAME')
     os.environ.pop('REUTERS_PASSWORD')
Esempio n. 4
0
 def test_app_initialization_set_env_variables(self):
     item = {
         'username': '******',
         'password': '******'
     }
     crt_item = fillEnvironmentVariables(item)
     self.assertEqual(crt_item['username'], 'r_u')
     self.assertEqual(crt_item['password'], 'r_p')
 def test_app_initialization_set_env_variables(self):
     item = {
         "username": "******",
         "password": "******"
     }
     crt_item = fillEnvironmentVariables(item)
     self.assertEqual(crt_item["username"], "r_u")
     self.assertEqual(crt_item["password"], "r_p")
 def test_app_initialization_set_env_variables(self):
     os.environ.update({"REUTERS_USERNAME": "******", "REUTERS_PASSWORD": "******"})
     item = {"username": "******", "password": "******"}
     crt_item = fillEnvironmentVariables(item)
     self.assertTrue(crt_item["username"] == "r_username")
     self.assertTrue(crt_item["password"] == "r_password")
     os.environ.pop("REUTERS_USERNAME")
     os.environ.pop("REUTERS_PASSWORD")
    def test_app_initialization_notset_env_variables(self):
        def mock_env(variable, default):
            config = {'REUTERS_PASSWORD': '******'}
            return config.get(variable, default)

        settings.env = MagicMock(side_effect=mock_env)

        item = {'username': '******', 'password': '******'}
        crt_item = fillEnvironmentVariables(item)
        self.assertTrue(not crt_item)
    def test_app_initialization_notset_env_variables(self):
        def mock_env(variable, default):
            config = {'REUTERS_PASSWORD': '******'}
            return config.get(variable, default)

        settings.env = MagicMock(side_effect=mock_env)

        item = {
            'username': '******',
            'password': '******'
        }
        crt_item = fillEnvironmentVariables(item)
        self.assertTrue(not crt_item)
Esempio n. 9
0
 def test_app_initialization_set_env_variables(self):
     os.environ.update({
         'REUTERS_USERNAME': '******',
         'REUTERS_PASSWORD': '******'
     })
     item = {
         'username': '******',
         'password': '******'
     }
     crt_item = fillEnvironmentVariables(item)
     self.assertTrue(crt_item['username'] == 'r_username')
     self.assertTrue(crt_item['password'] == 'r_password')
     os.environ.pop('REUTERS_USERNAME')
     os.environ.pop('REUTERS_PASSWORD')
 def test_app_initialization_notset_env_variables(self):
     item = {'username': '******', 'password': '******'}
     crt_item = fillEnvironmentVariables(item)
     self.assertTrue(not crt_item)
 def test_app_initialization_set_env_variables(self):
     item = {'username': '******', 'password': '******'}
     crt_item = fillEnvironmentVariables(item)
     self.assertEqual(crt_item['username'], 'r_u')
     self.assertEqual(crt_item['password'], 'r_p')