Example #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')
Example #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']
 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']
Example #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())
Example #5
0
def load_example(name):
    # TODO: separate the concepts of example/development data and test
    #       fixtures.
    load_fixture(name)
    return 0
Example #6
0
def load_example(name):
    # TODO: separate the concepts of example/development data and test
    #       fixtures.
    load_fixture(name)
    return 0