commit be3c1e77b2a13ac93e4800a242450ae8850450a2 parent bfea7280af7f00370dca97b863e00c7caa44716c Author: MS <ms@taler.net> Date: Sun, 15 Nov 2020 05:39:09 +0100 Integration tests. Use appropriate setup/teardown functions. Diffstat:
| M | integration-tests/tests.py | | | 13 | +++++++------ |
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/integration-tests/tests.py b/integration-tests/tests.py @@ -123,8 +123,13 @@ def prepareNexus(): startNexus(NEXUS_DB) startSandbox(SANDBOX_DB) -prepareSandbox() -prepareNexus() +def setup_function(): + prepareSandbox() + prepareNexus() + +def teardown_function(): + flushTablesNexus(NEXUS_DB) + flushTablesSandbox(SANDBOX_DB) def test_empty_history(): resp = assertResponse( @@ -134,7 +139,3 @@ def test_empty_history(): ) ) assert len(resp.json().get("transactions")) == 0 - -# FIXME: find a way to reset the database between tests. -# flushTablesNexus(NEXUS_DB) -# flushTablesSandbox(SANDBOX_DB)