enhanced tests

bzr revid: alexandre.fayolle@camptocamp.com-20130522110608-acb2odz0tksm6sc2
This commit is contained in:
Alexandre Fayolle
2013-05-22 13:06:08 +02:00
parent 51a96dc5cd
commit 0e3d497beb
+11 -2
View File
@@ -3,12 +3,21 @@
Set the current user as multicompany user
-
!context
'uid': 'stock.multicompany_user'
uid: 'stock.multicompany_user'
-
check no error on getting default stock.move values for internal move
-
!python {model: stock.move}: |
multicomp_user = ref('stock.multicompany_user')
context['picking_type'] = 'internal'
log('multicompany user: %s, uid: %s', multicomp_user, uid)
log('current context: %s', context)
defaults = self.default_get(cr, multicomp_user, ['location_id', 'location_dest_id', 'type'], context)
assertion_msg = "did not get the correct default (got: %s)" % defaults
log('got defaults: %s', defaults)
assert defaults == {'location_id': False, 'location_dest_id': False, 'type': 'internal'}, assertion_msg
defaults = self.default_get(cr, uid, ['location_id', 'location_dest_id', 'type'], context)
assert defaults == {'location_id': False, 'location_dest_id': False, 'type': 'internal'}, "did not get the correct default (got: %s)" % defaults
assertion_msg = "did not get the correct default with uid %s (got: %s)" % (uid, defaults)
log('got defaults: %s', defaults)
assert defaults == {'location_id': False, 'location_dest_id': False, 'type': 'internal'}, assertion_msg