Example #1
0
    def test_upload_csv_file(self):
        config = MongoStorageConfiguration()
        engine = MongoStorageEngine(config)
        engine.initialise()
        store = MongoNormalStore(engine)

        self.assert_upload_csv_file(store)
Example #2
0
    def test_lookup_storage(self):
        config = MongoStorageConfiguration()
        engine = MongoStorageEngine(config)
        engine.initialise()
        store = MongoNormalStore(engine)

        self.assert_lookup_storage(store)
Example #3
0
    def _get_store(storetype, engine):
        if storetype == 'categories':
            return MongoCategoryStore(engine)
        if storetype == 'maps':
            return MongoMapsStore(engine)
        if storetype == 'sets':
            return MongoSetsStore(engine)
        if storetype == 'rdfs':
            return MongoRDFsStore(engine)
        if storetype == 'preprocessors':
            return MongoPreProcessorStore(engine)
        if storetype == 'postprocessors':
            return MongoPostProcessorStore(engine)
        if storetype == 'postquestionprocessors':
            return MongoPostQuestionProcessorStore(engine)
        if storetype == 'templatenodes':
            return MongoTemplateNodeStore(engine)
        if storetype == 'patternnodes':
            return MongoPatternNodeStore(engine)
        if storetype == 'properties':
            return MongoPropertyStore(engine)
        if storetype == 'defaults':
            return MongoDefaultVariablesStore(engine)
        if storetype == 'regexes':
            return MongoRegexesStore(engine)
        if storetype == 'denormals':
            return MongoDenormalStore(engine)
        if storetype == 'normals':
            return MongoNormalStore(engine)
        if storetype == 'genders':
            return MongoGenderStore(engine)
        if storetype == 'persons':
            return MongoPersonStore(engine)
        if storetype == 'person2s':
            return MongoPerson2Store(engine)
        if storetype == 'spelling':
            return MongoSpellingStore(engine)
        if storetype == 'licenses':
            return MongoLicenseKeysStore(engine)
        if storetype == 'usergroups':
            return MongoUserGroupsStore(engine)
        if storetype == 'triggers':
            return MongoTriggerStore(engine)
        if storetype == 'oobs':
            return MongoOOBStore(engine)
        if storetype == 'services':
            return MongoServiceStore(engine)

        raise Exception("Unknone entity storetype [%s]" % storetype)
Example #4
0
 def test_initialise(self):
     config = MongoStorageConfiguration()
     engine = MongoStorageEngine(config)
     engine.initialise()
     store = MongoNormalStore(engine)
     self.assertEqual(store.storage_engine, engine)
Example #5
0
 def normal_store(self):
     return MongoNormalStore(self)