[test] Avoid unauthorized / validation error conflict
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 27 Apr 2017 11:40:58 +0200
changeset 2633 cdc858532db1
parent 2632 71a41868cf22
child 2634 8f1a4f7abbf6
[test] Avoid unauthorized / validation error conflict since an archive transfer may have only one seda_comment relation and the tested entity already has one, rather use another to demonstrate the unauthorized permission.
test/test_schema.py
--- a/test/test_schema.py	Fri Apr 21 16:09:17 2017 +0200
+++ b/test/test_schema.py	Thu Apr 27 11:40:58 2017 +0200
@@ -298,7 +298,7 @@
             with self.assertUnauthorized(cnx):
                 comment.cw_set(comment=u'You got hacked')
             with self.assertUnauthorized(cnx):
-                cnx.create_entity('SEDAComment', seda_comment=transfer)
+                cnx.create_entity('SEDAArchivalAgreement', seda_archival_agreement=transfer)
             # modification of a relation from the container to a non contained entity
             with self.assertUnauthorized(cnx):
                 testutils.create_authority_record(cnx, name=u'Bob Archival inc.',