test: add context to product-create

This commit is contained in:
Frederik Jaeckel 2023-06-07 19:24:43 +02:00
parent 8f12741d76
commit ebb6d71be3
3 changed files with 55 additions and 42 deletions

View file

@ -36,9 +36,10 @@ class SourceTestCase(object):
}])
self.assertEqual(osource.rec_name, 'Source 1')
product = self.prep_asset_product(
name='Product 1',
description='some asset')
with Transaction().set_context({'company': company.id}):
product = self.prep_asset_product(
name='Product 1',
description='some asset')
Product.write(*[
[product],