Use common doctest_dropdb
review2151002
This commit is contained in:
1 parent
a246490910
commit
e9545aef4d
1 file changed
+1
-12
@@ -15,9 +15,8 @@ import datetime
|
||||
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_depends, doctest_dropdb
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.backend.sqlite.database import Database as SQLiteDatabase
|
||||
|
||||
|
||||
class AccountInvoiceTestCase(unittest.TestCase):
|
||||
@@ -93,16 +92,6 @@ class AccountInvoiceTestCase(unittest.TestCase):
|
||||
])
|
||||
|
||||
|
||||
def doctest_dropdb(test):
|
||||
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(
|
||||
|
||||
Reference in new issue
Block a user