Esempio n. 1
0
    def setup(self):
        h.skip_if_stubbed_solr()

        super(TestSearch, self).setup()
        h.load_fixture('cra')

        ourdict = {
            '_id': 'myspecialid',
            'cofog1_ws': 'foobar'
        }

        self.solr = solr.get_connection()
        self.solr.add(**ourdict)
        self.solr.commit()

        solr.build_index(dataset_name='cra')
Esempio n. 2
0
 def setup(self):
     super(TestCompoundDimension, self).setup()
     self.engine = db.engine
     self.meta = db.metadata
     self.meta.bind = self.engine
     self.ds = h.load_fixture('cra')
     self.entity = self.ds['from']
     self.classifier = self.ds['cofog1']
Esempio n. 3
0
 def setup(self):
     super(TestCompoundDimension, self).setup()
     self.engine = db.engine
     self.meta = db.metadata
     self.meta.bind = self.engine
     self.ds = h.load_fixture('cra')
     self.entity = self.ds['from']
     self.classifier = self.ds['cofog1']
Esempio n. 4
0
    def test_compute_cube(self):
        from openspending.model import Dataset

        cra = h.load_fixture('cra')

        cube = Cube.configure_default_cube(cra)
        cube.compute()

        h.assert_true('cubes.cra.default' in mongo.db().collection_names())
Esempio n. 5
0
def load_example(name):
    # TODO: separate the concepts of example/development data and test
    #       fixtures.
    load_fixture(name)
    return 0
Esempio n. 6
0
def load_example(name):
    # TODO: separate the concepts of example/development data and test
    #       fixtures.
    load_fixture(name)
    return 0