예제 #1
0
 def test_inserts_portal_type(self):
     bundle = self.load_bundle()
     self.assertEqual([('businesscasedossier', 'Dossier Vreni Meier'),
                       ('businesscasedossier', 'Hanspeter M\xc3\xbcller'),
                       ('document', 'Bewerbung Hanspeter M\xc3\xbcller'),
                       ('document', 'Document referenced via UNC-Path'),
                       ('document', 'Entlassung Hanspeter M\xc3\xbcller'),
                       ('mail', ''), ('mail', 'Ein Mail'),
                       ('repositoryfolder', 'Organigramm, Prozesse'),
                       ('repositoryfolder', 'Organisation'),
                       ('repositoryfolder', 'Personal'),
                       ('repositoryroot', 'Ordnungssystem')],
                      sorted([(get_portal_type(i), get_title(i))
                              for i in list(bundle)]))
 def test_inserts_portal_type(self):
     items = self.load_bundle()
     self.assertEqual(
         [
             ("businesscasedossier", u"Dossier Vreni Meier"),
             ("businesscasedossier", u"Hanspeter M\xfcller"),
             ("document", u"Bewerbung Hanspeter M\xfcller"),
             ("document", u"Entlassung Hanspeter M\xfcller"),
             ("mail", u"Ein Mail"),
             ("repositoryfolder", u"Organigramm, Prozesse"),
             ("repositoryfolder", u"Organisation"),
             ("repositoryfolder", u"Personal"),
             ("repositoryroot", u"Ordnungssystem"),
         ],
         sorted([(get_portal_type(i), get_title(i)) for i in items]),
     )
 def test_loads_items_in_correct_order(self):
     bundle = self.load_bundle()
     self.assertEqual(
         [('repositoryroot', 'Ordnungssystem'),
          ('repositoryfolder', 'Personal'),
          ('repositoryfolder', 'Organigramm, Prozesse'),
          ('repositoryfolder', 'Organisation'),
          ('businesscasedossier', 'Dossier Peter Schneider'),
          ('businesscasedossier',
           'Dossier in bestehendem Examplecontent Repository'),
          ('businesscasedossier', 'Hanspeter M\xc3\xbcller'),
          ('document', 'Bewerbung Hanspeter M\xc3\xbcller'),
          ('document', 'Entlassung Hanspeter M\xc3\xbcller'),
          ('mail', 'Ein Mail'), ('mail', ''),
          ('document', 'Document referenced via UNC-Path'),
          ('document', 'Dokument in bestehendem Examplecontent Dossier'),
          ('mail', 'Mail in bestehendem Examplecontent Dossier')],
         [(get_portal_type(i), get_title(i)) for i in list(bundle)])
 def test_inserts_portal_type(self):
     bundle = self.load_bundle()
     self.assertEqual([
         ('businesscasedossier', 'Dossier Peter Schneider'),
         ('businesscasedossier',
          'Dossier in bestehendem Examplecontent Repository'),
         ('businesscasedossier', 'Hanspeter M\xc3\xbcller'),
         ('document', 'Bewerbung Hanspeter M\xc3\xbcller'),
         ('document', 'Document referenced via UNC-Path'),
         ('document', 'Dokument in bestehendem Examplecontent Dossier'),
         ('document', 'Entlassung Hanspeter M\xc3\xbcller'),
         ('mail', ''),
         ('mail', 'Ein Mail'),
         ('mail', 'Mail in bestehendem Examplecontent Dossier'),
         ('repositoryfolder', 'Organigramm, Prozesse'),
         ('repositoryfolder', 'Organisation'),
         ('repositoryfolder', 'Personal'),
         ('repositoryroot', 'Ordnungssystem')],
         sorted([(get_portal_type(i), get_title(i)) for i in list(bundle)]))