(fix) config testing

This commit is contained in:
ishaan-jaff 2023-12-04 15:24:46 -08:00
parent b7281825d3
commit 9b3a0c69f5

View file

@ -173,17 +173,18 @@ def test_load_router_config():
try:
print("testing reading config")
# this is a basic config.yaml with only a model
result = load_router_config(router=None, config_file_path="example_config_yaml/simple_config.yaml")
filepath = os.path.dirname(os.path.abspath(__file__))
result = load_router_config(router=None, config_file_path=f"{filepath}/example_config_yaml/simple_config.yaml")
print(result)
assert len(result[1]) == 1
# this is a load balancing config yaml
result = load_router_config(router=None, config_file_path="example_config_yaml/azure_config.yaml")
result = load_router_config(router=None, config_file_path=f"{filepath}/example_config_yaml/azure_config.yaml")
print(result)
assert len(result[1]) == 2
# config with general settings - custom callbacks
result = load_router_config(router=None, config_file_path="example_config_yaml/azure_config.yaml")
result = load_router_config(router=None, config_file_path=f"{filepath}/example_config_yaml/azure_config.yaml")
print(result)
assert len(result[1]) == 2