- Timestamp:
- Sep 8, 2019, 2:55:52 PM (7 years ago)
- Branches:
- debian/bullseye, master
- Children:
- 5446f28
- Parents:
- aa68798
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mapservice/codegen/templates/__init__test.mustache
raa68798 rfc99a86 4 4 from flask_cors import CORS 5 5 from flask_testing import TestCase 6 from sqlalchemy.event import listen 6 7 7 8 from {{packageName}}.encoder import JSONEncoder 9 from {{packageName}}.server_impl.database.Model import db, db_test_setup 8 10 9 from {{packageName}}.server_impl.database.Model import db, db_test_setup 11 def load_spatialite(dbapi_conn, connection_record): 12 print("enable spatial lite extension") 13 # From https://geoalchemy-2.readthedocs.io/en/latest/spatialite_tutorial.html 14 dbapi_conn.enable_load_extension(True) 15 dbapi_conn.load_extension('/usr/local/lib64/mod_spatialite') 10 16 11 17 class BaseTestCase(TestCase): … … 25 31 26 32 def setUp(self): 33 listen(db.engine, 'connect', load_spatialite) 27 34 db.drop_all() 28 35 db_test_setup()
Note:
See TracChangeset
for help on using the changeset viewer.
