Use common doctest_dropdb
review2151002
This commit is contained in:
1 parent
319c0d7fe5
commit
169aedc427
1 file changed
+1
-15
@@ -13,9 +13,8 @@ import doctest
|
||||
from decimal import Decimal
|
||||
import trytond.tests.test_tryton
|
||||
from trytond.tests.test_tryton import POOL, DB_NAME, USER, CONTEXT, \
|
||||
test_view, test_depends
|
||||
test_view, test_depends, doctest_dropdb
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.backend.sqlite.database import Database as SQLiteDatabase
|
||||
|
||||
|
||||
class CarrierWeightTestCase(unittest.TestCase):
|
||||
@@ -89,19 +88,6 @@ class CarrierWeightTestCase(unittest.TestCase):
|
||||
(price, currency.id))
|
||||
|
||||
|
||||
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()
|
||||
from trytond.modules.product.tests import test_product
|
||||
|
||||
Reference in new issue
Block a user