Example #1
0
 def setUp(self):
     init_annalist_test_site()
     self.testsite = Site(TestBaseUri, TestBaseDir)
     self.testcoll = Collection(self.testsite, "testcoll")
     self.testcoll1 = Collection(self.testsite, "testcoll1")
     self.testcoll2 = Collection(self.testsite, "testcoll2")
     self.fieldcache = CollectionFieldCache()
     self.field1 = RecordField(self.testcoll1, "field1")
     self.field1.set_values(
         recordfield_create_values(field_id="field1",
                                   property_uri="test:field1",
                                   superproperty_uris=[]))
     self.field11 = RecordField(self.testcoll1, "field11")
     self.field11.set_values(
         recordfield_create_values(field_id="field11",
                                   property_uri="test:field11",
                                   superproperty_uris=["test:field1"]))
     self.field111 = RecordField(self.testcoll1, "field111")
     self.field111.set_values(
         recordfield_create_values(field_id="field111",
                                   property_uri="test:field111",
                                   superproperty_uris=["test:field11"]))
     self.field2 = RecordField(self.testcoll1, "field2")
     self.field2.set_values(
         recordfield_create_values(field_id="field2",
                                   property_uri="test:field2",
                                   superproperty_uris=[]))
     return
Example #2
0
 def setUp(self):
     self.filepath  = "%s/README.md"%TestBaseDir
     self.fileuri   = "file://"+self.filepath
     self.imagepath = "%s/test-image.jpg"%TestBaseDir
     self.imageuri  = "file://"+self.filepath
     init_annalist_test_site()
     init_annalist_test_coll()
     self.testsite    = Site(TestBaseUri, TestBaseDir)
     self.testcoll    = Collection(self.testsite, "testcoll")
     # Populate collection with record type, view and field
     self.test_ref_type = RecordType.create(
         self.testcoll, "testreftype", test_image_ref_type_create_values
         )
     self.test_ref_view = RecordView.create(
         self.testcoll, "testrefview", test_image_ref_view_create_values
         )
     self.test_ref_field = RecordField.create(
         self.testcoll, "Test_image_ref", test_image_ref_field_create_values
         )
     # Create data records for testing image references:
     self.test_ref_type_info = EntityTypeInfo(
         self.testcoll, "testreftype", create_typedata=True
         )
     self.test_ref_type_info.create_entity("test1", test_ref_entity_create_values(self.imageuri))
     # Login and permissions
     create_test_user(self.testcoll, "testuser", "testpassword")
     self.client = Client(HTTP_HOST=TestHost)
     loggedin = self.client.login(username="******", password="******")
     self.assertTrue(loggedin)
     return
Example #3
0
 def setUp(self):
     init_annalist_test_site()
     self.testsite = Site(TestBaseUri, TestBaseDir)
     self.testcoll = Collection(self.testsite, "testcoll")
     self.testtype = RecordType(self.testcoll, "testtype")
     self.testdata = RecordTypeData(self.testcoll, "testtype")
     return
Example #4
0
 def setUp(self):
     init_annalist_test_site()
     self.testsite = Site(TestBaseUri, TestBaseDir)
     self.sitedata = SiteData(self.testsite)
     self.testcoll = Collection(self.testsite, "testcoll")
     self.layout = ({
         'enum_field_placement_id': layout.ENUM_FIELD_PLACEMENT_ID,
         'enum_list_type_id': layout.ENUM_LIST_TYPE_ID,
         'enum_render_type_id': layout.ENUM_RENDER_TYPE_ID,
         'enum_value_type_id': layout.ENUM_VALUE_TYPE_ID,
         'enum_value_mode_id': layout.ENUM_VALUE_MODE_ID,
         'field_typeid': layout.FIELD_TYPEID,
         'group_typeid': layout.GROUP_TYPEID,
         'list_typeid': layout.LIST_TYPEID,
         'type_typeid': layout.TYPE_TYPEID,
         'user_typeid': layout.USER_TYPEID,
         'view_typeid': layout.VIEW_TYPEID,
         'vocab_typeid': layout.VOCAB_TYPEID,
         'field_dir': layout.FIELD_DIR,
         'group_dir': layout.GROUP_DIR,
         'list_dir': layout.LIST_DIR,
         'type_dir': layout.TYPE_DIR,
         'user_dir': layout.USER_DIR,
         'view_dir': layout.VIEW_DIR,
         'vocab_dir': layout.VOCAB_DIR
     })
     return
Example #5
0
 def setUp(self):
     init_annalist_test_site()
     init_annalist_test_coll()
     self.testsite = Site(TestBaseUri, TestBaseDir)
     self.testcoll = Collection(self.testsite, "testcoll")
     # Populate collection with linked record types, views and lists
     self.test_supertype_type = RecordType.create(
         self.testcoll, "test_supertype_type",
         test_supertype_type_create_values)
     self.test_subtype_type = RecordType.create(
         self.testcoll, "test_subtype_type",
         test_subtype_type_create_values)
     self.no_options = [FieldChoice('', label="(no options)")]
     # Create type and data records for testing:
     self.test_supertype_type_info = EntityTypeInfo(self.testcoll,
                                                    "test_supertype_type",
                                                    create_typedata=True)
     self.test_subtype_type_info = EntityTypeInfo(self.testcoll,
                                                  "test_subtype_type",
                                                  create_typedata=True)
     for entity_id in ("test_subtype_entity", ):
         self.test_subtype_type_info.create_entity(
             entity_id, test_subtype_entity_create_values(entity_id))
     # Login and permissions
     create_test_user(self.testcoll, "testuser", "testpassword")
     self.client = Client(HTTP_HOST=TestHost)
     loggedin = self.client.login(username="******",
                                  password="******")
     self.assertTrue(loggedin)
     return
 def setUp(self):
     init_annalist_test_site()
     self.testsite = Site(TestBaseUri, TestBaseDir)
     self.testcoll = Collection(self.testsite, "testcoll")
     self.testcoll1_a = Collection(self.testsite, "testcoll1")
     self.testcoll1_b = Collection(self.testsite, "testcoll1")
     self.testcoll2_a = Collection(self.testsite, "testcoll2")
     self.testcoll2_b = Collection(self.testsite, "testcoll2")
     self.typecache = CollectionTypeCache()
     self.type1 = RecordType(self.testcoll1_a, "type1")
     self.type1.set_values(
         recordtype_create_values(type_id="type1",
                                  type_uri="test:type1",
                                  supertype_uris=[]))
     self.type11 = RecordType(self.testcoll1_a, "type11")
     self.type11.set_values(
         recordtype_create_values(type_id="type11",
                                  type_uri="test:type11",
                                  supertype_uris=["test:type1"]))
     self.type111 = RecordType(self.testcoll1_a, "type111")
     self.type111.set_values(
         recordtype_create_values(type_id="type111",
                                  type_uri="test:type111",
                                  supertype_uris=["test:type11"]))
     self.type12 = RecordType(self.testcoll1_a, "type12")
     self.type12.set_values(
         recordtype_create_values(type_id="type12",
                                  type_uri="test:type12",
                                  supertype_uris=["test:type1"]))
     self.type2 = RecordType(self.testcoll1_a, "type2")
     self.type2.set_values(
         recordtype_create_values(type_id="type2",
                                  type_uri="test:type2",
                                  supertype_uris=[]))
     self.type21 = RecordType(self.testcoll1_a, "type21")
     self.type21.set_values(
         recordtype_create_values(type_id="type21",
                                  type_uri="test:type21",
                                  supertype_uris=["test:type2"]))
     self.type22 = RecordType(self.testcoll1_a, "type22")
     self.type22.set_values(
         recordtype_create_values(type_id="type22",
                                  type_uri="test:type22",
                                  supertype_uris=["test:type2"]))
     return
 def test_set_alt_entities_loop(self):
     altcoll1  = Collection(self.testsite, "altcoll1")
     parents   = self.testcoll.set_alt_entities(altcoll1)
     parentids = [ p.get_id() for p in parents ]
     self.assertEqual( parentids, ["testcoll", "altcoll1", layout.SITEDATA_ID])
     with SuppressLogging(logging.ERROR):
         with self.assertRaises(ValueError):
             parents   = altcoll1.set_alt_entities(self.testcoll)
     return
Example #8
0
 def setUp(self):
     init_annalist_test_site()
     self.testsite = Site(TestBaseUri, TestBaseDir)
     self.testcoll = Collection(self.testsite, "testcoll")
     # self.tokenset_context  = self._make_test_context(
     #     ["aa", "bb", "cc"], repeat_prefix="tokprefix_"
     #     )
     self.intvalue_context = self._make_test_context(
         42, repeat_prefix="intprefix_")
     return
 def setUp(self):
     init_annalist_test_site()
     self.testsite = Site(TestBaseUri, TestBaseDir)
     self.testcoll = Collection(self.testsite, "testcoll")
     self.testdata = RecordTypeData(self.testcoll, "testtype")
     # Login and permissions
     create_test_user(self.testcoll, "testuser", "testpassword")
     self.client = Client(HTTP_HOST=TestHost)
     loggedin = self.client.login(username="******", password="******")
     self.assertTrue(loggedin)
     return
Example #10
0
 def setUp(self):
     init_annalist_test_site()
     self.testsite = Site(TestBaseUri, TestBaseDir)
     self.testcoll = Collection(self.testsite, "testcoll")
     self.testcoll1_a = Collection(self.testsite, "testcoll1")
     self.testcoll1_b = Collection(self.testsite, "testcoll1")
     self.testcoll2_a = Collection(self.testsite, "testcoll2")
     self.testcoll2_b = Collection(self.testsite, "testcoll2")
     self.vocabcache = CollectionVocabCache()
     self.vocab1 = RecordVocab(self.testcoll1_a, "vocab1")
     self.vocab1.set_values(
         entitydata_create_values("vocab1",
                                  type_id="_vocab",
                                  entity_uri="test:vocab1"))
     self.vocab2 = RecordVocab(self.testcoll1_a, "vocab2")
     self.vocab2.set_values(
         entitydata_create_values("vocab2",
                                  type_id="_vocab",
                                  entity_uri="test:vocab2"))
     return
 def test_collection_init(self):
     log.debug("test_collection_init: TestBaseUri %s, TestBaseDir %s"%(TestBaseUri,TestBaseDir))
     s = Site(TestBaseUri, TestBaseDir)
     c = Collection(s, "testcoll")
     self.assertEqual(c._entitytype,     ANNAL.CURIE.Collection)
     self.assertEqual(c._entityfile,     layout.COLL_META_REF)
     self.assertEqual(c._entityref,      layout.META_COLL_REF)
     self.assertEqual(c._entityid,       "testcoll")
     self.assertEqual(c._entityurl,      TestHostUri + collection_view_url(coll_id="testcoll"))
     self.assertEqual(c._entitydir,      collection_dir(coll_id="testcoll"))
     self.assertEqual(c._values,         None)
     return
 def setUp(self):
     init_annalist_test_site()
     init_annalist_test_coll()
     self.testsite = Site(TestBaseUri, TestBaseDir)
     self.testcoll = Collection(self.testsite, "testcoll")
     # Populate collection with linked record types, views and lists
     self.testsrc_type = RecordType.create(self.testcoll, "testsrc_type",
                                           testsrc_type_create_values)
     self.testtgt_type = RecordType.create(self.testcoll, "testtgt_type",
                                           testtgt_type_create_values)
     self.testsrc_view = RecordView.create(self.testcoll, "testsrc_view",
                                           testsrc_view_create_values)
     self.testtgt_view = RecordView.create(self.testcoll, "testtgt_view",
                                           testtgt_view_create_values)
     self.testsrc_list = RecordList.create(self.testcoll, "testsrc_list",
                                           testsrc_list_create_values)
     self.testtgt_list = RecordList.create(self.testcoll, "testtgt_list",
                                           testtgt_list_create_values)
     self.testtgtref_field = RecordField.create(
         self.testcoll, "testtgtref_field", testtgtref_field_create_values)
     self.no_options = [FieldChoice('', label="(no options)")]
     self.tgt_options = ([
         FieldChoice("testtgt_type/" + v,
                     label="testtgt_entity %s label" % v,
                     link=entity_url("testcoll", "testtgt_type", v))
         for v in ["testtgt1", "testtgt2"]
     ])
     # Create data records for testing:
     self.testtgt_type_info = EntityTypeInfo(self.testcoll,
                                             "testtgt_type",
                                             create_typedata=True)
     self.testsrc_type_info = EntityTypeInfo(self.testcoll,
                                             "testsrc_type",
                                             create_typedata=True)
     for tgt_id in ("testtgt1", "testtgt2"):
         self.testtgt_type_info.create_entity(
             tgt_id, testtgt_entity_create_values(tgt_id))
     for src_id, tgt_ref in (("testsrc1", "testtgt1"), ("testsrc2",
                                                        "testtgt2")):
         self.testsrc_type_info.create_entity(
             src_id, testsrc_entity_create_values(src_id, tgt_ref))
     # Login and permissions
     create_test_user(self.testcoll, "testuser", "testpassword")
     self.client = Client(HTTP_HOST=TestHost)
     loggedin = self.client.login(username="******",
                                  password="******")
     self.assertTrue(loggedin)
     return
Example #13
0
 def setUp(self):
     self.fileuri = "file://%s/README.md"%TestBaseDir
     init_annalist_test_site()
     init_annalist_test_coll()
     self.testsite    = Site(TestBaseUri, TestBaseDir)
     self.testcoll    = Collection(self.testsite, "testcoll")
     # Populate collection with linked record types, views and lists
     self.test_imp_type = RecordType.create(
         self.testcoll, "testimptype", test_import_type_create_values
         )
     self.test_imp_view = RecordView.create(
         self.testcoll, "testimpview", test_import_view_create_values
         )
     self.test_imp_field = RecordField.create(
         self.testcoll, "Test_import", test_import_field_create_values
         )
     self.test_ref_type = RecordType.create(
         self.testcoll, "testreftype", test_reference_type_create_values
         )
     self.test_ref_view = RecordView.create(
         self.testcoll, "testrefview", test_reference_view_create_values
         )
     self.test_ref_field = RecordField.create(
         self.testcoll, "Test_reference", test_reference_field_create_values
         )
     # Create data records for testing import and references:
     self.test_imp_type_info = EntityTypeInfo(
         self.testcoll, "testimptype", create_typedata=True
         )
     for entity_id in ("test1", "test2"):
         self.test_imp_type_info.create_entity(
             entity_id, test_imp_entity_create_values(entity_id)
             )
     self.test_ref_type_info = EntityTypeInfo(
         self.testcoll, "testreftype", create_typedata=True
         )
     for entity_id in ("test1", "test2"):
         self.test_ref_type_info.create_entity(
             entity_id, test_ref_entity_create_values(entity_id)
             )
     # Login and permissions
     create_test_user(self.testcoll, "testuser", "testpassword")
     self.client = Client(HTTP_HOST=TestHost)
     loggedin = self.client.login(username="******", password="******")
     self.assertTrue(loggedin)
     return
Example #14
0
 def setUp(self):
     init_annalist_test_site()
     self.testsite = Site(TestBaseUri, TestBaseDir)
     self.testcoll = Collection(self.testsite, "testcoll")
     self.coll1 = collection_values("coll1")
     self.testcoll_add = collection_create_values("testcoll")
     self.type1_add = recordtype_create_values("testcoll", "type1")
     self.type1 = recordtype_read_values("testcoll", "type1")
     self.type2_add = recordtype_create_values("testcoll", "type2")
     self.type2 = recordtype_read_values("testcoll", "type2")
     self.view1_add = recordview_create_values("testcoll", "view1")
     self.view1 = recordview_read_values("testcoll", "view1")
     self.view2_add = recordview_create_values("testcoll", "view2")
     self.view2 = recordview_read_values("testcoll", "view2")
     self.list1_add = recordlist_create_values("testcoll", "list1")
     self.list1 = recordlist_read_values("testcoll", "list1")
     self.list2_add = recordlist_create_values("testcoll", "list2")
     self.list2 = recordlist_read_values("testcoll", "list2")
     return
Example #15
0
 def setUp(self):
     init_annalist_test_site()
     self.testsite = Site(TestBaseUri, TestBaseDir)
     self.sitedata = SiteData(self.testsite)
     self.testcoll = Collection(self.testsite, "testcoll")
     self.layout = ({
         'enum_typeid': layout.ENUM_TYPEID,
         'field_typeid': layout.FIELD_TYPEID,
         'group_typeid': layout.GROUP_TYPEID,
         'list_typeid': layout.LIST_TYPEID,
         'type_typeid': layout.TYPE_TYPEID,
         'user_typeid': layout.USER_TYPEID,
         'view_typeid': layout.VIEW_TYPEID,
         'vocab_typeid': layout.VOCAB_TYPEID,
         'enum_dir': layout.ENUM_DIR,
         'field_dir': layout.FIELD_DIR,
         'group_dir': layout.GROUP_DIR,
         'list_dir': layout.LIST_DIR,
         'type_dir': layout.TYPE_DIR,
         'user_dir': layout.USER_DIR,
         'view_dir': layout.VIEW_DIR,
         'vocab_dir': layout.VOCAB_DIR
     })
     return
Example #16
0
 def setUp(self):
     init_annalist_test_site()
     self.testsite = Site(TestBaseUri, TestBaseDir)
     self.testcoll = Collection(self.testsite, "testcoll")
     return
Example #17
0
 def setUp(self):
     self.testsite     = Site(TestBaseUri, TestBaseDir)
     self.testcoll     = Collection(self.testsite, "testcoll")
     self.closurecache = ClosureCache(self.testcoll.get_id(), "test:rel")
     return
    def setUp(self):
        self.filepath = "%s/testdatafile.md" % TestBaseDir
        self.fileuri = "file://" + self.filepath
        self.imagepath = "%s/test-image.jpg" % TestBaseDir
        self.imageuri = "file://" + self.imagepath
        init_annalist_test_site()
        init_annalist_test_coll()
        self.testsite = Site(TestBaseUri, TestBaseDir)
        self.testcoll = Collection(self.testsite, "testcoll")
        # Populate collection with linked record types, views and lists

        # Types
        self.test_upl_type = RecordType.create(self.testcoll, "testupltype",
                                               test_upload_type_create_values)
        self.test_ref_type = RecordType.create(
            self.testcoll, "testreftype", test_reference_type_create_values)
        self.test_image_type = RecordType.create(
            self.testcoll, "testimgtype", test_image_type_create_values)

        # Views
        self.test_upl_file_view = RecordView.create(
            self.testcoll, "testuplfileview",
            test_upload_file_view_create_values)
        self.test_upl_image_view = RecordView.create(
            self.testcoll, "testuplimageview",
            test_upload_image_view_create_values)
        self.test_ref_file_view = RecordView.create(
            self.testcoll, "testrefview", test_reference_view_create_values)
        self.test_ref_image_view = RecordView.create(
            self.testcoll, "testimgrefview", test_image_ref_view_create_values)
        self.test_image_view = RecordView.create(
            self.testcoll, "testimgview", test_image_view_create_values)

        # Fields
        self.test_upl_file_field = RecordField.create(
            self.testcoll, "Test_upload_file",
            test_upload_file_field_create_values)
        self.test_upl_image_field = RecordField.create(
            self.testcoll, "Test_upload_image",
            test_upload_image_field_create_values)
        self.test_ref_file_field = RecordField.create(
            self.testcoll, "Test_reference",
            test_reference_field_create_values)
        self.test_ref_image_field = RecordField.create(
            self.testcoll, "Test_image_ref",
            test_image_ref_field_create_values)
        self.test_image_field = RecordField.create(
            self.testcoll, "Test_image", test_image_field_create_values)

        # Create data records for testing import and references:
        test_entity_ids = ("test1", "test2")
        test_entity_ids = ("test1", )
        self.test_upl_type_info = EntityTypeInfo(self.testcoll,
                                                 "testupltype",
                                                 create_typedata=True)
        for entity_id in test_entity_ids:
            self.test_upl_type_info.create_entity(
                entity_id, test_imp_entity_create_values(entity_id))
        self.test_ref_type_info = EntityTypeInfo(self.testcoll,
                                                 "testreftype",
                                                 create_typedata=True)
        for entity_id in test_entity_ids:
            self.test_ref_type_info.create_entity(
                entity_id, test_ref_entity_create_values(entity_id))
        self.test_img_type_info = EntityTypeInfo(self.testcoll,
                                                 "testimgtype",
                                                 create_typedata=True)
        for entity_id in test_entity_ids:
            self.test_img_type_info.create_entity(
                entity_id, test_img_entity_create_values(entity_id))
        # Login and permissions
        create_test_user(self.testcoll, "testuser", "testpassword")
        self.client = Client(HTTP_HOST=TestHost)
        loggedin = self.client.login(username="******",
                                     password="******")
        self.assertTrue(loggedin)
        return
 def test_set_alt_entities_1(self):
     altcoll1  = Collection(self.testsite, "altcoll1")
     parents   = self.testcoll.set_alt_entities(altcoll1)
     parentids = [ p.get_id() for p in parents ]
     self.assertEqual( parentids, ["testcoll", "altcoll1", layout.SITEDATA_ID])
     return
Example #20
0
 def setUp(self):
     init_annalist_test_site()
     self.testsite = Site(TestBaseUri, TestBaseDir)
     self.testcoll = Collection(self.testsite, "testcoll")
     self.testenum = RecordEnumFactory("testenum", layout.ENUM_LIST_TYPE_ID)
     return
 def setUp(self):
     init_annalist_test_site()
     self.testsite = Site(TestBaseUri, TestBaseDir)
     self.testcoll = Collection(self.testsite, "testcoll")
     # populate site with different classes of users: admin, config, create, update, delete, view
     self.user_admin = AnnalistUser.create(
         self.testcoll, "user_admin",
         annalistuser_create_values(
             coll_id="testcoll",
             user_id="user_admin",
             user_name="Admin User",
             user_uri="mailto:user_admin@%s" % TestHost,
             user_permissions=[
                 "VIEW", "CREATE", "UPDATE", "DELETE", "CONFIG", "ADMIN"
             ]))
     self.user_config = AnnalistUser.create(
         self.testcoll, "user_config",
         annalistuser_create_values(
             coll_id="testcoll",
             user_id="user_config",
             user_name="Admin User",
             user_uri="mailto:user_config@%s" % TestHost,
             user_permissions=[
                 "VIEW", "CREATE", "UPDATE", "DELETE", "CONFIG"
             ]))
     self.user_create = AnnalistUser.create(
         self.testcoll, "user_create",
         annalistuser_create_values(
             coll_id="testcoll",
             user_id="user_create",
             user_name="Admin User",
             user_uri="mailto:user_create@%s" % TestHost,
             user_permissions=["VIEW", "UPDATE", "CREATE"]))
     self.user_update = AnnalistUser.create(
         self.testcoll, "user_update",
         annalistuser_create_values(coll_id="testcoll",
                                    user_id="user_update",
                                    user_name="Admin User",
                                    user_uri="mailto:user_update@%s" %
                                    TestHost,
                                    user_permissions=["VIEW", "UPDATE"]))
     self.user_delete = AnnalistUser.create(
         self.testcoll, "user_delete",
         annalistuser_create_values(
             coll_id="testcoll",
             user_id="user_delete",
             user_name="Admin User",
             user_uri="mailto:user_delete@%s" % TestHost,
             user_permissions=["VIEW", "UPDATE", "DELETE"]))
     self.user_view = AnnalistUser.create(
         self.testcoll, "user_view",
         annalistuser_create_values(coll_id="testcoll",
                                    user_id="user_view",
                                    user_name="Admin User",
                                    user_uri="mailto:user_view@%s" %
                                    TestHost,
                                    user_permissions=["VIEW"]))
     self.user_site_admin = AnnalistUser.create(
         self.testsite,
         "user_site_admin",
         annalistuser_create_values(
             coll_id="testcoll",
             user_id="user_site_admin",
             user_name="Site_admin User",
             user_uri="mailto:user_site_admin@%s" % TestHost,
             user_permissions=[
                 "VIEW", "CREATE", "UPDATE", "DELETE", "CONFIG", "ADMIN"
             ]),
         use_altpath=True)
     self.user_site_create_coll = AnnalistUser.create(
         self.testsite,
         "user_site_create_coll",
         annalistuser_create_values(
             coll_id="testcoll",
             user_id="user_site_create_coll",
             user_name="Site_create User",
             user_uri="mailto:user_site_create_coll@%s" % TestHost,
             user_permissions=["VIEW", "CREATE_COLLECTION"]),
         use_altpath=True)
     self.user_site_delete_coll = AnnalistUser.create(
         self.testsite,
         "user_site_delete_coll",
         annalistuser_create_values(
             coll_id="testcoll",
             user_id="user_site_delete_coll_coll",
             user_name="Site_delete User",
             user_uri="mailto:user_site_delete_coll@%s" % TestHost,
             user_permissions=[
                 "VIEW", "CREATE_COLLECTION", "DELETE_COLLECTION"
             ]),
         use_altpath=True)
     self.user_site_view = AnnalistUser.create(
         self.testsite,
         "user_site_view",
         annalistuser_create_values(coll_id="testcoll",
                                    user_id="user_site_view",
                                    user_name="Site_view User",
                                    user_uri="mailto:user_site_view@%s" %
                                    TestHost,
                                    user_permissions=["VIEW"]),
         use_altpath=True)
     return
Example #22
0
 def setUp(self):
     init_annalist_test_site()
     self.testsite = Site(TestBaseUri, TestBaseDir)
     self.testcoll = Collection(self.testsite, "testcoll")
     self.testenum = RecordEnumFactory("testenum", "Enum_list_type")
     return