Пример #1
0
 def dump_oai_registry(self, dumpRecords=True, dumpSets=True, dumpMetadataFormats=True):
     self.assertEquals(len(OaiRegistry.objects()), 0)
     self.restoreDump(join(DUMP_OAI_PMH_TEST_PATH, 'oai_registry.bson'), 'oai_registry')
     self.assertTrue(len(OaiRegistry.objects()) > 0)
     self.dump_oai_identify()
     if dumpMetadataFormats:
         self.dump_oai_metadata_format()
     if dumpSets:
         self.dump_oai_set()
     if dumpRecords:
         self.dump_oai_record()
Пример #2
0
 def dump_oai_registry(self,
                       dumpRecords=True,
                       dumpSets=True,
                       dumpMetadataFormats=True):
     self.assertEquals(len(OaiRegistry.objects()), 0)
     self.restoreDump(join(DUMP_OAI_PMH_TEST_PATH, 'oai_registry.bson'),
                      'oai_registry')
     self.assertTrue(len(OaiRegistry.objects()) > 0)
     self.dump_oai_identify()
     if dumpMetadataFormats:
         self.dump_oai_metadata_format()
     if dumpSets:
         self.dump_oai_set()
     if dumpRecords:
         self.dump_oai_record()
Пример #3
0
 def dump_oai_record(self):
     self.assertEquals(len(OaiRecord.objects()), 0)
     self.restoreDump(join(DUMP_OAI_PMH_TEST_PATH, 'oai_record.bson'), 'oai_record')
     self.assertTrue(len(OaiRecord.objects()) > 0)
Пример #4
0
 def dump_oai_set(self):
     self.assertEquals(len(OaiSet.objects()), 0)
     self.restoreDump(join(DUMP_OAI_PMH_TEST_PATH, 'oai_set.bson'), 'oai_set')
     self.assertTrue(len(OaiSet.objects()) > 0)
Пример #5
0
 def dump_oai_metadata_format(self):
     self.assertEquals(len(OaiMetadataFormat.objects()), 0)
     self.restoreDump(join(DUMP_OAI_PMH_TEST_PATH, 'oai_metadata_format.bson'), 'oai_metadata_format')
     self.assertTrue(len(OaiMetadataFormat.objects()) > 0)
Пример #6
0
 def dump_oai_identify(self):
     self.assertEquals(len(OaiIdentify.objects()), 0)
     self.restoreDump(join(DUMP_OAI_PMH_TEST_PATH, 'oai_identify.bson'), 'oai_identify')
     self.assertTrue(len(OaiIdentify.objects()) > 0)
Пример #7
0
 def dump_oai_templ_mf_xslt(self):
     self.assertEquals(len(OaiTemplMfXslt.objects()), 0)
     self.restoreDump(join(DUMP_OAI_PMH_TEST_PATH, 'oai_templ_mf_xslt.bson'), 'oai_templ_mf_xslt')
     self.assertTrue(len(OaiTemplMfXslt.objects()) > 0)
Пример #8
0
 def dump_oai_metadata_format(self):
     self.assertEquals(len(OaiMetadataFormat.objects()), 0)
     self.restoreDump(
         join(DUMP_OAI_PMH_TEST_PATH, 'oai_metadata_format.bson'),
         'oai_metadata_format')
     self.assertTrue(len(OaiMetadataFormat.objects()) > 0)
Пример #9
0
 def dump_oai_identify(self):
     self.assertEquals(len(OaiIdentify.objects()), 0)
     self.restoreDump(join(DUMP_OAI_PMH_TEST_PATH, 'oai_identify.bson'),
                      'oai_identify')
     self.assertTrue(len(OaiIdentify.objects()) > 0)
Пример #10
0
 def dump_oai_xslt(self):
     self.assertEquals(len(OaiXslt.objects()), 0)
     self.restoreDump(join(DUMP_OAI_PMH_TEST_PATH, 'oai_xslt.bson'),
                      'oai_xslt')
     self.assertTrue(len(OaiXslt.objects()) > 0)
Пример #11
0
 def dump_oai_settings_bad(self):
     self.assertEquals(len(OaiSettings.objects()), 0)
     self.restoreDump(join(DUMP_OAI_PMH_TEST_PATH, 'oai_settings_bad.bson'),
                      'oai_settings')
     self.assertTrue(len(OaiSettings.objects()) > 0)
Пример #12
0
 def dump_oai_record(self):
     self.assertEquals(len(OaiRecord.objects()), 0)
     self.restoreDump(join(DUMP_OAI_PMH_TEST_PATH, 'oai_record.bson'),
                      'oai_record')
     self.assertTrue(len(OaiRecord.objects()) > 0)