diff --git a/emission/core/config.py b/emission/core/config.py index e1c0d13c4..6612732c2 100644 --- a/emission/core/config.py +++ b/emission/core/config.py @@ -25,7 +25,7 @@ def get_config_data(): # Check if all DB environment variables are not set # if check_unset_env_vars(): # print("All DB environment variables are set to None") - logging.debug("storage not configured, falling back to sample, default configuration") + print("storage not configured, falling back to sample, default configuration") ret_val = get_config_data_from_env() return ret_val diff --git a/emission/net/api/config.py b/emission/net/api/config.py index 030bcf322..31e0e34c0 100644 --- a/emission/net/api/config.py +++ b/emission/net/api/config.py @@ -28,7 +28,7 @@ def check_unset_env_vars(): def get_config_data(): try: - config_file = open('conf/storage/db.conf') + config_file = open('conf/net/api/webserver.conf') ret_val = json.load(config_file) config_file.close() except: diff --git a/emission/tests/netTests/TestPush.py b/emission/tests/netTests/TestPush.py index 8fb1e1456..865ffa0b7 100644 --- a/emission/tests/netTests/TestPush.py +++ b/emission/tests/netTests/TestPush.py @@ -189,14 +189,6 @@ def testFcmNoMapping(self): # and there will be no entries in the token mapping database self.assertEqual(edb.get_push_token_mapping_db().count_documents({}), 0) - def testNoEnvVarSetUp(self): - self.tearDown() - import emission.net.ext_service.push.notify_interface as pni - # import emission.net.ext_service.push.config as pc - # print("Fetching push config from ENV variables by deleting existing non-sample JSON file") - # self.tearDown() - # self.assertRaises(TypeError, pc.get_config_data()) - self.setUp() if __name__ == '__main__': import emission.tests.common as etc diff --git a/emission/tests/netTests/TestWebserver.py b/emission/tests/netTests/TestWebserver.py index 588944623..2c3a634d9 100644 --- a/emission/tests/netTests/TestWebserver.py +++ b/emission/tests/netTests/TestWebserver.py @@ -35,19 +35,19 @@ def setUp(self): # Setting webserver environment variables with test values os.environ[env_var_name] = env_var_value - print("Finished setting up test webserver environment variables") - print("Current original values are = %s" % self.originalWebserverEnvVars) - print("Current modified values are = %s" % self.testModifiedEnvVars) + logging.debug("Finished setting up test webserver environment variables") + logging.debug("Current original values are = %s" % self.originalWebserverEnvVars) + logging.debug("Current modified values are = %s" % self.testModifiedEnvVars) def tearDown(self): - print("Deleting test webserver environment variables") + logging.debug("Deleting test webserver environment variables") for env_var_name, env_var_value in self.testModifiedEnvVars.items(): del os.environ[env_var_name] # Restoring original webserver environment variables for env_var_name, env_var_value in self.originalWebserverEnvVars.items(): os.environ[env_var_name] = env_var_value - print("Finished restoring original webserver environment variables") - print("Restored original values are = %s" % self.originalWebserverEnvVars) + logging.debug("Finished restoring original webserver environment variables") + logging.debug("Restored original values are = %s" % self.originalWebserverEnvVars) def test404Redirect(self): from emission.net.api.bottle import response