From 5eff62fd223fb03fcdc4acceab6759f00ea8bf49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 18 Dec 2013 18:30:19 +0100 Subject: [PATCH] Use common doctest_dropdb review2151002 --- tests/test_production.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/tests/test_production.py b/tests/test_production.py index 105409ae23..6373c8b02a 100644 --- a/tests/test_production.py +++ b/tests/test_production.py @@ -12,8 +12,7 @@ if os.path.isdir(DIR): sys.path.insert(0, os.path.dirname(DIR)) import trytond.tests.test_tryton -from trytond.tests.test_tryton import test_view, test_depends -from trytond.backend.sqlite.database import Database as SQLiteDatabase +from trytond.tests.test_tryton import test_view, test_depends, doctest_dropdb class ProductionTestCase(unittest.TestCase): @@ -37,19 +36,6 @@ class ProductionTestCase(unittest.TestCase): test_depends() -def doctest_dropdb(test): - ''' - Remove sqlite memory database - ''' - database = SQLiteDatabase().connect() - cursor = database.cursor(autocommit=True) - try: - database.drop(cursor, ':memory:') - cursor.commit() - finally: - cursor.close() - - def suite(): suite = trytond.tests.test_tryton.suite() suite.addTests(unittest.TestLoader().loadTestsFromTestCase(