mirror of
https://github.com/wassname/IndicoIo-python.git
synced 2026-07-04 17:20:04 +08:00
Initial test coverage for new configuration system
This commit is contained in:
committed by
Madison May
parent
6b9251f4f5
commit
dc47fe5b0a
@@ -0,0 +1,15 @@
|
||||
import os
|
||||
|
||||
from indicoio import config
|
||||
|
||||
def test_batch_set_url_root_as_env_var():
|
||||
test_data = ['clearly an english sentence']
|
||||
old_private_cloud_url = os.environ.get("INDICO_PRIVATE_CLOUD_URL")
|
||||
os.environ["INDICO_PRIVATE_CLOUD_URL"] = "http://not.a.real.url/"
|
||||
|
||||
assert config.get_api_root() == "http://not.a.real.url/"
|
||||
|
||||
if old_private_cloud_url:
|
||||
os.environ["INDICO_PRIVATE_CLOUD_URL"] = old_private_cloud_url
|
||||
else:
|
||||
del(os.environ["INDICO_PRIVATE_CLOUD_URL"])
|
||||
Reference in New Issue
Block a user