Tests: make sure DB overwrite actually takes
This commit is contained in:
parent
22fe31a141
commit
94c6562f82
|
@ -29,7 +29,7 @@ if not os.path.exists(configpath): # fall back to config.yaml in home
|
||||||
def get_app():
|
def get_app():
|
||||||
register()
|
register()
|
||||||
app = raw_app
|
app = raw_app
|
||||||
if os.path.exists(configpath):
|
if os.path.exists(configpath) and not app.config["TESTING"]:
|
||||||
import yaml
|
import yaml
|
||||||
app.config.from_file(configpath, yaml.safe_load)
|
app.config.from_file(configpath, yaml.safe_load)
|
||||||
logging.info(f"Updated config from {configpath}")
|
logging.info(f"Updated config from {configpath}")
|
||||||
|
|
|
@ -11,10 +11,11 @@ class TestDocs(unittest.TestCase):
|
||||||
"filename": ":memory:",
|
"filename": ":memory:",
|
||||||
"create_db": True,
|
"create_db": True,
|
||||||
}
|
}
|
||||||
app = get_app()
|
raw_app.config.update({
|
||||||
app.config.update({
|
|
||||||
"TESTING": True,
|
"TESTING": True,
|
||||||
})
|
})
|
||||||
|
app = get_app()
|
||||||
|
|
||||||
cls.client = app.test_client()
|
cls.client = app.test_client()
|
||||||
|
|
||||||
def testCorrectErrorEmptyRequest(self):
|
def testCorrectErrorEmptyRequest(self):
|
||||||
|
|
Loading…
Reference in New Issue