Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisclark committed Jul 24, 2024
1 parent a1d62b1 commit a9e1133
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions explorer/tests/test_create_sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ class TestCreateSqlite(TestCase):

def test_parse_to_sqlite(self):
file = SimpleUploadedFile("name.csv", b"name, title\nchris,cto", content_type="text/csv")
sqlite_bytes, name = parse_to_sqlite(file)
sqlite_bytes, name = parse_to_sqlite(file, user_id=1)
rows = write_sqlite_and_get_row(sqlite_bytes, "name")

self.assertEqual(name, "name.db")
self.assertEqual(rows[0], ("chris", "cto"))
self.assertEqual(name, "name_1.db")

def test_parse_to_sqlite_with_no_parser(self):
file = SimpleUploadedFile("name.db", SQLITE_BYTES, content_type="application/x-sqlite3")
sqlite_bytes, name = parse_to_sqlite(file)
sqlite_bytes, name = parse_to_sqlite(file, user_id=1)
rows = write_sqlite_and_get_row(sqlite_bytes, "data")

self.assertEqual(rows[0], ("chris", "cto"))
self.assertEqual(name, "name.db")
self.assertEqual(name, "name_1.db")

0 comments on commit a9e1133

Please sign in to comment.