From 9d32c76781bdbd3c450b3dc317bbfcbeda44b78e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 28 Nov 2011 14:46:29 +0100 Subject: [PATCH] Fix Transaction.start to use keyword argument for context (transplanted from 7f11df2d8906ac027c272b60fbb2a6ceee5f619f) --- tests/test_stock.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_stock.py b/tests/test_stock.py index dbef2fed24..1caa6f1205 100644 --- a/tests/test_stock.py +++ b/tests/test_stock.py @@ -52,7 +52,7 @@ class StockTestCase(unittest.TestCase): ''' Test Move.internal_quantity. ''' - with Transaction().start(DB_NAME, USER, CONTEXT) as transaction: + with Transaction().start(DB_NAME, USER, context=CONTEXT): category_id = self.category.create({ 'name': 'Test Move.internal_quantity', }) @@ -108,7 +108,8 @@ class StockTestCase(unittest.TestCase): ''' Test products_by_location. ''' - with Transaction().start(DB_NAME, USER, CONTEXT) as transaction: + with Transaction().start(DB_NAME, USER, + context=CONTEXT) as transaction: category_id = self.category.create({ 'name': 'Test products_by_location', }) @@ -301,7 +302,7 @@ class StockTestCase(unittest.TestCase): ''' Test period. ''' - with Transaction().start(DB_NAME, USER, CONTEXT) as transaction: + with Transaction().start(DB_NAME, USER, context=CONTEXT): category_id = self.category.create({ 'name': 'Test period', })