From b27b411978cc2ace2aa57a590019ce7fdecc2c05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 28 Nov 2011 14:45:13 +0100 Subject: [PATCH] Fix Transaction.start to use keyword argument for context (transplanted from 10446f23d82c43ad582c16d13b5a5d61668e9807) --- tests/test_company.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/test_company.py b/tests/test_company.py index 946a176edd..d7041a348d 100644 --- a/tests/test_company.py +++ b/tests/test_company.py @@ -42,7 +42,8 @@ class CompanyTestCase(unittest.TestCase): ''' Create company. ''' - with Transaction().start(DB_NAME, USER, CONTEXT) as transaction: + with Transaction().start(DB_NAME, USER, + context=CONTEXT) as transaction: currency1_id = self.currency.search([ ('code', '=', 'cu1'), ], 0, 1, None)[0] @@ -58,7 +59,7 @@ class CompanyTestCase(unittest.TestCase): ''' Test company recursion. ''' - with Transaction().start(DB_NAME, USER, CONTEXT) as transaction: + with Transaction().start(DB_NAME, USER, context=CONTEXT): currency1_id = self.currency.search([ ('code', '=', 'cu1'), ], 0, 1, None)[0] @@ -83,7 +84,8 @@ class CompanyTestCase(unittest.TestCase): ''' Create employee. ''' - with Transaction().start(DB_NAME, USER, CONTEXT) as transaction: + with Transaction().start(DB_NAME, USER, + context=CONTEXT) as transaction: company1_id = self.company.search([ ('name', '=', 'B2CK'), ], 0, 1, None)[0] @@ -98,7 +100,8 @@ class CompanyTestCase(unittest.TestCase): ''' Test user company ''' - with Transaction().start(DB_NAME, USER, CONTEXT) as transaction: + with Transaction().start(DB_NAME, USER, + context=CONTEXT) as transaction: currency1_id = self.currency.search([ ('code', '=', 'cu1'), ], 0, 1, None)[0]