Index: src/mapservice/codegen/templates/__init__test.mustache
===================================================================
--- src/mapservice/codegen/templates/__init__test.mustache	(revision 8f3d1dd83116e3e0c5982f652ccd36a7565acb7b)
+++ src/mapservice/codegen/templates/__init__test.mustache	(revision 5ec7c42c36e8ad2b624d1f8150fea782f6c78872)
@@ -7,11 +7,6 @@
 
 from {{packageName}}.encoder import JSONEncoder
-from {{packageName}}.server_impl.database.Model import db, db_test_setup
-
-def load_spatialite(dbapi_conn, connection_record):
-	print("enable spatial lite extension")
-	# From https://geoalchemy-2.readthedocs.io/en/latest/spatialite_tutorial.html
-	dbapi_conn.enable_load_extension(True)
-	dbapi_conn.load_extension('/usr/local/lib64/mod_spatialite')
+from {{packageName}}.server_impl.database.Model import db, db_setup, load_spatialite
+from {{packageName}}.server_impl.demo import DbSetup as demoDbSetup
 
 class BaseTestCase(TestCase):
@@ -33,5 +28,7 @@
 		listen(db.engine, 'connect', load_spatialite)
 		db.drop_all()
-		db_test_setup()
+		# create the tables whether the database already exists or not
+		db_setup(False)
+		demoDbSetup.setup()
         
 	def tearDown(self):
