Spaces:
Sleeping
Sleeping
Mohammed Thameem commited on
Commit ·
af37fe3
1
Parent(s): 1f52c8d
modified test script
Browse files- tests/test_app.py +9 -7
tests/test_app.py
CHANGED
|
@@ -14,17 +14,19 @@ def test_respond_function_exists():
|
|
| 14 |
|
| 15 |
def test_respond_returns_generator():
|
| 16 |
"""respond() should return a generator when called with minimal args."""
|
| 17 |
-
class DummyToken:
|
| 18 |
-
token = "dummy"
|
| 19 |
|
| 20 |
gen = app.respond(
|
| 21 |
message="I'm buying a bottle of water.",
|
| 22 |
history=[],
|
| 23 |
system_message="You are Sustainable.ai.",
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
| 28 |
)
|
| 29 |
|
| 30 |
-
|
|
|
|
|
|
| 14 |
|
| 15 |
def test_respond_returns_generator():
|
| 16 |
"""respond() should return a generator when called with minimal args."""
|
|
|
|
|
|
|
| 17 |
|
| 18 |
gen = app.respond(
|
| 19 |
message="I'm buying a bottle of water.",
|
| 20 |
history=[],
|
| 21 |
system_message="You are Sustainable.ai.",
|
| 22 |
+
car_km=10,
|
| 23 |
+
bus_km=0,
|
| 24 |
+
train_km=0,
|
| 25 |
+
air_km=0,
|
| 26 |
+
meat_meals=3,
|
| 27 |
+
vegetarian_meals=2,
|
| 28 |
+
vegan_meals=1,
|
| 29 |
)
|
| 30 |
|
| 31 |
+
import types
|
| 32 |
+
assert isinstance(gen, types.GeneratorType)
|