]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/bdd/environment.py
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / test / bdd / environment.py
index 2bea318039d14f3de2d01600decabf80bc6bd5b4..162346decbecb7b6bfb78c634b14044485e27be3 100644 (file)
@@ -122,6 +122,9 @@ class NominatimEnvironment(object):
     def setup_api_db(self, context):
         self.write_nominatim_config(self.api_test_db)
 
     def setup_api_db(self, context):
         self.write_nominatim_config(self.api_test_db)
 
+    def setup_unknown_db(self, context):
+        self.write_nominatim_config('UNKNOWN_DATABASE_NAME')
+
     def setup_db(self, context):
         self.setup_template_db()
         self.write_nominatim_config(self.test_db)
     def setup_db(self, context):
         self.setup_template_db()
         self.write_nominatim_config(self.test_db)
@@ -261,6 +264,8 @@ def before_scenario(context, scenario):
         context.nominatim.setup_db(context)
     elif 'APIDB' in context.tags:
         context.nominatim.setup_api_db(context)
         context.nominatim.setup_db(context)
     elif 'APIDB' in context.tags:
         context.nominatim.setup_api_db(context)
+    elif 'UNKNOWNDB' in context.tags:
+        context.nominatim.setup_unknown_db(context)
     context.scene = None
 
 def after_scenario(context, scenario):
     context.scene = None
 
 def after_scenario(context, scenario):