Skip to content

Commit 9bc174c

Browse files
authored
Merge pull request #143 from gisce/disable_test_acces_rules_for_test_class
Dont check acces rules for classes with attribute _test_class True
2 parents 782b3ae + 41fc36d commit 9bc174c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

destral/testing.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ def test_access_rules(self):
181181
if imd_ids:
182182
for imd in imd_obj.browse(txn.cursor, txn.user, imd_ids):
183183
model_id = imd.res_id
184+
if getattr(self.openerp.pool.get(imd.model), '_test_class', False):
185+
continue
184186
access_ids = access_obj.search(cursor, uid, [
185187
('model_id.id', '=', model_id)
186188
])

0 commit comments

Comments
 (0)