Anonymise tests
review2681002
This commit is contained in:
1 parent
d0597aab7f
commit
412410aa1b
2 files changed
+16
-8
No files matched your search
@@ -35,14 +35,14 @@ Create company::
|
||||
>>> company_config = Wizard('company.company.config')
|
||||
>>> company_config.execute('company')
|
||||
>>> company = company_config.form
|
||||
>>> party = Party(name='OPENLABS')
|
||||
>>> party = Party(name='Dunder Mifflin')
|
||||
>>> party.save()
|
||||
>>> company.party = party
|
||||
>>> currencies = Currency.find([('code', '=', 'EUR')])
|
||||
>>> currencies = Currency.find([('code', '=', 'USD')])
|
||||
>>> if not currencies:
|
||||
... currency = Currency(name='Euro', symbol=u'€', code='EUR',
|
||||
... currency = Currency(name='U.S. Dollar', symbol='$', code='USD',
|
||||
... rounding=Decimal('0.01'), mon_grouping='[3, 3, 0]',
|
||||
... mon_decimal_point=',')
|
||||
... mon_decimal_point='.', mon_thousands_sep=',')
|
||||
... currency.save()
|
||||
... CurrencyRate(date=today + relativedelta(month=1, day=1),
|
||||
... rate=Decimal('1.0'), currency=currency).save()
|
||||
|
||||
+12
-4
@@ -58,7 +58,9 @@ class StockTestCase(unittest.TestCase):
|
||||
}])
|
||||
supplier, = self.location.search([('code', '=', 'SUP')])
|
||||
storage, = self.location.search([('code', '=', 'STO')])
|
||||
company, = self.company.search([('rec_name', '=', 'B2CK')])
|
||||
company, = self.company.search([
|
||||
('rec_name', '=', 'Dunder Mifflin'),
|
||||
])
|
||||
currency = company.currency
|
||||
self.user.write([self.user(USER)], {
|
||||
'main_company': company.id,
|
||||
@@ -117,7 +119,9 @@ class StockTestCase(unittest.TestCase):
|
||||
supplier, = self.location.search([('code', '=', 'SUP')])
|
||||
customer, = self.location.search([('code', '=', 'CUS')])
|
||||
storage, = self.location.search([('code', '=', 'STO')])
|
||||
company, = self.company.search([('rec_name', '=', 'B2CK')])
|
||||
company, = self.company.search([
|
||||
('rec_name', '=', 'Dunder Mifflin'),
|
||||
])
|
||||
currency = company.currency
|
||||
self.user.write([self.user(USER)], {
|
||||
'main_company': company.id,
|
||||
@@ -371,7 +375,9 @@ class StockTestCase(unittest.TestCase):
|
||||
# Test with_childs
|
||||
with Transaction().start(DB_NAME, USER,
|
||||
context=CONTEXT) as transaction:
|
||||
company, = self.company.search([('rec_name', '=', 'B2CK')])
|
||||
company, = self.company.search([
|
||||
('rec_name', '=', 'Dunder Mifflin'),
|
||||
])
|
||||
self.user.write([self.user(USER)], {
|
||||
'main_company': company.id,
|
||||
'company': company.id,
|
||||
@@ -449,7 +455,9 @@ class StockTestCase(unittest.TestCase):
|
||||
supplier, = self.location.search([('code', '=', 'SUP')])
|
||||
customer, = self.location.search([('code', '=', 'CUS')])
|
||||
storage, = self.location.search([('code', '=', 'STO')])
|
||||
company, = self.company.search([('rec_name', '=', 'B2CK')])
|
||||
company, = self.company.search([
|
||||
('rec_name', '=', 'Dunder Mifflin'),
|
||||
])
|
||||
currency = company.currency
|
||||
self.user.write([self.user(USER)], {
|
||||
'main_company': company.id,
|
||||
|
||||
Reference in new issue
Block a user