Wait for db close on tests

This commit is contained in:
shortcutme 2019-09-28 17:03:43 +02:00
parent 43c366d2fb
commit 3682f0aed4
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -207,6 +207,7 @@ def site_temp(request):
site_temp.storage.deleteFiles()
site_temp.content_manager.contents.db.deleteSite(site_temp)
site_temp.content_manager.contents.db.close()
time.sleep(0.01) # Wait for db close
db_path = "%s-temp/content.db" % config.data_dir
os.unlink(db_path)
del ContentDb.content_dbs[db_path]