diff --git a/src/bsdd/tests/test_bsdd.py b/src/bsdd/tests/test_bsdd.py index 7d975a2da0..d6f4d39725 100644 --- a/src/bsdd/tests/test_bsdd.py +++ b/src/bsdd/tests/test_bsdd.py @@ -1,19 +1,27 @@ +import time + from bsdd import Client client = Client() # Fetch shared data at module level to avoid repeated API calls during tests. -# The Client.get() method handles 429 rate-limit responses with automatic retry. +# Sleep 3s between calls: the bSDD API rate-limits to ~1 req/2s, and Client.get() +# retries on 429, but back-to-back calls without spacing still exhaust the retry budget. _dictionaries = client.get_dictionary()["dictionaries"] ifc4x3_uri = next(l["uri"] for l in _dictionaries if "4.3" in l["uri"]) nbs_uri = next(l["uri"] for l in _dictionaries if "Uniclass 2015" == l["name"]) +time.sleep(3) _ifc4x3_classes = client.get_classes(ifc4x3_uri, use_nested_classes=False, class_type="Class") +time.sleep(3) _nbs_classes = client.get_classes(nbs_uri, use_nested_classes=False, class_type="Class", offset=0, limit=5) _uri_light_fixture = next(l for l in _ifc4x3_classes["classes"] if "IfcLightFixture" == l["code"])["uri"] +time.sleep(3) _light_fixture = client.get_class(_uri_light_fixture) +time.sleep(3) _light_fixture_relations = client.get_class_relations(_uri_light_fixture) +time.sleep(3) _light_fixture_properties = client.get_class_properties(_uri_light_fixture)