[PATCH saem] [test] Fix test broken by permissions change in the eac cube

Sylvain Thenault sylvain.thenault at logilab.fr
Thu Jun 22 16:19:04 CEST 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1498129888 -7200
#      Thu Jun 22 13:11:28 2017 +0200
# Node ID ea255b3ad3fd252b2e7b46c518aaa97919c3b11e
# Parent  533d21385389a5e61e29a9de87143bcfbe86e471
# Available At http://hg.logilab.org/review/cubes/saem_ref
#              hg pull http://hg.logilab.org/review/cubes/saem_ref -r ea255b3ad3fd
[test] Fix test broken by permissions change in the eac cube

even managers may not create AgentKind anymore.

diff --git a/test/unittest_schema.py b/test/unittest_schema.py
--- a/test/unittest_schema.py
+++ b/test/unittest_schema.py
@@ -234,12 +234,11 @@ class SchemaConstraintsTC(CubicWebTC):
 
 class AuthorityRecordTC(CubicWebTC):
 
     def test_fti(self):
         with self.admin_access.repo_cnx() as cnx:
-            cnx.create_entity('AgentKind', name=u'Queen')
-            agent = testutils.authority_record(cnx, u'Guenievre', kind=u'Queen',
+            agent = testutils.authority_record(cnx, u'Guenievre', kind=u'person',
                                                end_date=date(476, 2, 9))
             address = cnx.create_entity('PostalAddress', street=u"1 av. de l'europe",
                                         postalcode=u'31400', city=u'Toulouse')
             cnx.create_entity('AgentPlace', name=u'place', place_address=address, place_agent=agent)
             cnx.create_entity('AgentFunction', name=u'function', function_agent=agent)


More information about the saem-devel mailing list