Skip to content

Commit d2a862f

Browse files
committed
Added integration tests for CSV()
1 parent c0cfd85 commit d2a862f

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

tests/_async/test_filter_request_builder_integration.py

+12
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,18 @@ async def test_explain_json():
401401
assert res.data[0]["Plan"]["Node Type"] == "Aggregate"
402402

403403

404+
async def test_csv():
405+
res = (
406+
await rest_client()
407+
.from_("countries")
408+
.select("country_name, iso")
409+
.in_("nicename", ["Albania", "Algeria"])
410+
.csv()
411+
.execute()
412+
)
413+
assert "ALBANIA,AL\nALGERIA,DZ" in res.data
414+
415+
404416
async def test_explain_text():
405417
res = (
406418
await rest_client()

tests/_sync/test_filter_request_builder_integration.py

+12
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,18 @@ def test_or_in():
360360
]
361361

362362

363+
def test_csv():
364+
res = (
365+
rest_client()
366+
.from_("countries")
367+
.select("country_name, iso")
368+
.in_("nicename", ["Albania", "Algeria"])
369+
.csv()
370+
.execute()
371+
)
372+
assert "ALBANIA,AL\nALGERIA,DZ" in res.data
373+
374+
363375
def test_or_on_reference_table():
364376
res = (
365377
rest_client()

0 commit comments

Comments
 (0)