-def test_import_osm_data_simple(temp_db_cursor,osm2pgsql_options):
- temp_db_cursor.execute('CREATE TABLE place (id INT)')
- temp_db_cursor.execute('INSERT INTO place values (1)')
+def test_import_osm_data_simple(table_factory, osm2pgsql_options):
+ table_factory('place', content=((1, ), ))
+
+ database_import.import_osm_data(Path('file.pbf'), osm2pgsql_options)
+
+
+def test_import_osm_data_multifile(table_factory, tmp_path, osm2pgsql_options):
+ table_factory('place', content=((1, ), ))
+ osm2pgsql_options['osm2pgsql_cache'] = 0
+
+ files = [tmp_path / 'file1.osm', tmp_path / 'file2.osm']
+ for f in files:
+ f.write_text('test')