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()
Esempio n. 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()
 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)
 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)
 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)
 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)
 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)