Spaces:
Sleeping
Sleeping
File size: 797 Bytes
49b0d9a 8478871 ac9ccc9 6a26d93 8478871 772f7d2 8478871 af37fe3 8478871 af37fe3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | import sys, os
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
import app
import types
import app
def test_respond_function_exists():
"""Check that the app has a respond() function."""
assert hasattr(app, "respond")
assert callable(app.respond)
def test_respond_returns_generator():
"""respond() should return a generator when called with minimal args."""
gen = app.respond(
message="I'm buying a bottle of water.",
history=[],
hf_token_ui="",
system_message="You are Sustainable.ai.",
car_km=10,
bus_km=0,
train_km=0,
air_km=0,
meat_meals=3,
vegetarian_meals=2,
vegan_meals=1,
)
import types
assert isinstance(gen, types.GeneratorType)
|