Skip to content

Commit 2a0aa31

Browse files
committed
adding cleanup function. tests randomly failing in travis
1 parent 01c149d commit 2a0aa31

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

tests/test_odm2/test_odm2.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,16 @@ def setup( request):
5353
session_factory.getSession().execute(line)
5454

5555
print 'database initialization completed successfully'
56+
57+
def fin():
58+
print ("teardown odm2 test connection")
59+
del dbConn.odmread
60+
del dbConn.odmcreate
61+
del dbConn.odmupdate
62+
del dbConn.odmdelete
63+
64+
request.addfinalizer(fin)
65+
5666
return dbConn
5767

5868
@pytest.mark.skipif(True, reason="Enable for testing: CreateService Session closes on failed create #52")

0 commit comments

Comments
 (0)