From 48861cb7b50ce9755ef50f625cbb8580ff401c15 Mon Sep 17 00:00:00 2001 From: Ruben Young On <r.d.youngon@student.tudelft.nl> Date: Tue, 28 May 2019 11:45:57 +0200 Subject: [PATCH] Added delete_test_data function --- tests/test_api.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_api.py b/tests/test_api.py index 42c99ae1..8127b8e4 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -30,6 +30,17 @@ def add_test_data(): db.session.commit() +def delete_test_data(): + db.session.query(Exam).delete() + db.session.commit() + + db.session.query(Problem).delete() + db.session.commit() + + db.session.query(ProblemWidget).delete() + db.session.commit() + + @pytest.fixture() def app(): app = Flask(__name__, static_folder=None) -- GitLab