Skip to content

Commit

Permalink
Fix ORDER BY
Browse files Browse the repository at this point in the history
  • Loading branch information
john-bodley committed Apr 27, 2023
1 parent 2bb6407 commit 50db0de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/integration_tests/csv_upload_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,12 +385,12 @@ def test_import_csv(mock_event_logger):
)
# make sure that john and empty string are replaced with None
with test_db.get_sqla_engine_with_context() as engine:
data = engine.execute(f"SELECT * from {CSV_UPLOAD_TABLE} ORDER BY b").fetchall()
data = engine.execute(f"SELECT * from {CSV_UPLOAD_TABLE} ORDER BY c").fetchall()
assert data == [(None, 1, "x"), ("paul", 2, None)]
# default null values
upload_csv(CSV_FILENAME2, CSV_UPLOAD_TABLE, extra={"if_exists": "replace"})
# make sure that john and empty string are replaced with None
data = engine.execute(f"SELECT * from {CSV_UPLOAD_TABLE} ORDER BY b").fetchall()
data = engine.execute(f"SELECT * from {CSV_UPLOAD_TABLE} ORDER BY c").fetchall()
assert data == [("john", 1, "x"), ("paul", 2, None)]

# cleanup
Expand Down

0 comments on commit 50db0de

Please sign in to comment.