From 6168bb6aa718ce95d7948c539cef9666eb03707c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 28 Nov 2011 14:45:53 +0100 Subject: [PATCH] Fix Transaction.start to use keyword argument for context --- tests/test_party.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/test_party.py b/tests/test_party.py index c6a67a624a..db35e84c10 100644 --- a/tests/test_party.py +++ b/tests/test_party.py @@ -41,7 +41,8 @@ class PartyTestCase(unittest.TestCase): ''' Create category. ''' - with Transaction().start(DB_NAME, USER, CONTEXT) as transaction: + with Transaction().start(DB_NAME, USER, + context=CONTEXT) as transaction: category1_id = self.category.create({ 'name': 'Category 1', }) @@ -52,7 +53,7 @@ class PartyTestCase(unittest.TestCase): ''' Test category recursion. ''' - with Transaction().start(DB_NAME, USER, CONTEXT): + with Transaction().start(DB_NAME, USER, context=CONTEXT): category1_id = self.category.search([ ('name', '=', 'Category 1'), ], limit=1)[0] @@ -72,7 +73,8 @@ class PartyTestCase(unittest.TestCase): ''' Create party. ''' - with Transaction().start(DB_NAME, USER, CONTEXT) as transaction: + with Transaction().start(DB_NAME, USER, + context=CONTEXT) as transaction: party1_id = self.party.create({ 'name': 'Party 1', }) @@ -83,7 +85,7 @@ class PartyTestCase(unittest.TestCase): ''' Test party code constraint. ''' - with Transaction().start(DB_NAME, USER, CONTEXT): + with Transaction().start(DB_NAME, USER, context=CONTEXT): party1_id = self.party.search([], limit=1)[0] code = self.party.read(party1_id, ['code'])['code'] @@ -101,7 +103,7 @@ class PartyTestCase(unittest.TestCase): ''' Create address. ''' - with Transaction().start(DB_NAME, USER, CONTEXT): + with Transaction().start(DB_NAME, USER, context=CONTEXT): party1_id = self.party.search([], limit=1)[0] self.address.create({