Update requirements (#406)

* Updating to use dataset and datafreeze
     * Use a new datafreeze serializer to get around Python 3 issues. 
* Update requirements.txt
* Add simple test for export_ctf()
This commit is contained in:
Kevin Chung
2017-10-07 21:29:03 -04:00
committed by GitHub
parent 069526fc87
commit b4bdef966c
4 changed files with 78 additions and 12 deletions

View File

@@ -4,6 +4,7 @@ from sqlalchemy_utils import database_exists, create_database, drop_database
from sqlalchemy.engine.url import make_url
import datetime
import six
import gc
if six.PY2:
text_type = unicode
@@ -42,6 +43,7 @@ def destroy_ctfd(app):
with app.app_context():
app.db.session.commit()
app.db.session.close_all()
gc.collect() # Garbage collect (necessary in the case of dataset freezes to clean database connections)
app.db.drop_all()
drop_database(app.config['SQLALCHEMY_DATABASE_URI'])