Ejemplo n.º 1
0
    def setUp(self):
        super(MetadataEntryTransformationTests, self).setUp()
        self.org_uuid = 'org01'
        self.test_entry = {
            self.CATEGORY_FIELD: 'health',
            'dataSample': 'some sample',
            'format': 'csv',
            'recordCount': 13,
            'size': 99999,
            'sourceUri': 'some uri',
            self.TARGET_URI_FIELD: 'hdfs://6.6.6.6:8200/borker/long-long-hash/9213-154b-a0b9/000000_1',
            'title': 'a great title',
            'isPublic': True,
            self.CREATION_TIME_FIELD: '2015-02-13T13:00:00',
            self.ORG_UUID_FIELD: self.org_uuid
        }

        self.test_entry_index = {
            self.CATEGORY_FIELD: 'health',
            'dataSample': 'some sample',
            'format': 'csv',
            'recordCount': 13,
            'size': 99999,
            'sourceUri': 'some uri',
            self.TARGET_URI_FIELD: 'hdfs://6.6.6.6:8200/borker/long-long-hash/9213-154b-a0b9/000000_1',
            'title': 'a great title',
            'isPublic': True,
            self.CREATION_TIME_FIELD: '2015-02-13T13:00:00',
            self.ORG_UUID_FIELD: self.org_uuid
        }
        self.parser = MetadataIndexingTransformer()
 def __init__(self):
     super(ElasticSearchAdminResource, self).__init__()
     self._elastic_search = Elasticsearch(
         '{}:{}'.format(self._config.elastic.elastic_hostname,
                        self._config.elastic.elastic_port))
     self._parser = MetadataIndexingTransformer()