def test_files_not_found(self):
     with self.assertRaises(Exception):
         cli.invoke(
             paths=["tests/fixtures/geojson/does_not_exist.geojson"],
             dbname=self.tmp.name,
             table="valid",
             primary_key=None,
             write_mode=None,
             srid=4326,
             spatialite_extension=None,
         )
 def test_custom_table_name(self):
     cli.invoke(
         paths=["tests/fixtures/geojson/valid.geojson"],
         dbname=self.tmp.name,
         table="custom",
         primary_key=None,
         write_mode=None,
         srid=4326,
         spatialite_extension=None,
     )
     records = self.conn.execute(
         "SELECT * FROM custom ORDER BY id;").fetchall()
     self.assertEqual(3, len(records))
 def test_two_files(self):
     cli.invoke(
         paths=[
             "tests/fixtures/geojson/valid.geojson",
             "tests/fixtures/geojson/valid.geojson",
         ],
         dbname=self.tmp.name,
         table="valid",
         primary_key=None,
         write_mode=None,
         srid=4326,
         spatialite_extension=None,
     )
     records = self.conn.execute(
         "SELECT * FROM valid ORDER BY id;").fetchall()
     self.assertEqual(3, len(records))
     records = self.conn.execute(
         "SELECT * FROM [valid-1] ORDER BY id;").fetchall()
     self.assertEqual(3, len(records))