Ejemplo n.º 1
0
 def teardown_class(cls):
     rebuild_all_dbs(cls.Session)
     p.unload('datastore')
     p.unload('datapusher')
     # Reenable Solr indexing
     if (sys.version_info[0] == 2 and sys.version_info[1] == 6
             and not p.plugin_loaded('synchronous_search')):
         p.load('synchronous_search')
Ejemplo n.º 2
0
 def teardown_class(cls):
     '''Nose runs this method once after all the test methods in our class
     have been run.
     '''
     rebuild_all_dbs(cls.Session)
     
     # unload plugins
     p.unload('datastore')
     p.unload('realtime')
Ejemplo n.º 3
0
    def setup_class(cls):
        '''Nose runs this method once to setup our test class.'''        
        # Make the Paste TestApp that we'll use to simulate HTTP requests to
        # CKAN.
        cls.app = paste.fixture.TestApp(pylons.test.pylonsapp)

        
        engine = sqlalchemy.create_engine(config['ckan.datastore.write_url'])
        cls.Session = orm.scoped_session(orm.sessionmaker(bind=engine))
        
        rebuild_all_dbs(cls.Session)
        p.load('datastore')
        p.load('realtime')
        
        ctd.CreateTestData.create()
        
        cls.sysadmin_user = model.User.get('testsysadmin')
        cls.normal_user = model.User.get('annafan')
        
        # make test resource writable through action api
        set_url_type(
            model.Package.get('annakarenina').resources, cls.sysadmin_user)
        
        cls._create_test_datastore()
Ejemplo n.º 4
0
 def teardown_class(cls):
     rebuild_all_dbs(cls.Session)
     p.unload("datastore")
Ejemplo n.º 5
0
Archivo: test.py Proyecto: Hoedic/ckan
 def teardown_class(cls):
     rebuild_all_dbs(cls.Session)
     p.unload('datastore')
     p.unload('datapusher')
Ejemplo n.º 6
0
 def teardown_class(cls):
     rebuild_all_dbs(cls.Session)
Ejemplo n.º 7
0
 def teardown_class(cls):
     rebuild_all_dbs(cls.Session)
     plugins.unload('datastore')
     plugins.unload('datastorecsw')
Ejemplo n.º 8
0
 def teardown_class(cls):
     helpers.rebuild_all_dbs(cls.Session)
     p.unload('datastore')
     config.clear()
     config.update(cls._original_config)
Ejemplo n.º 9
0
 def teardown_class(cls):
     helpers.rebuild_all_dbs(cls.Session)
     p.unload('datastore')
Ejemplo n.º 10
0
 def teardown_class(cls):
     p.unload('datastore')
     rebuild_all_dbs(cls.Session)
Ejemplo n.º 11
0
 def teardown_class(cls):
     rebuild_all_dbs(cls.Session)
     p.unload('timeseries')
 def teardown_class(cls):
     p.unload('datastore')
     rebuild_all_dbs(cls.Session)
Ejemplo n.º 13
0
 def teardown_class(cls):
     helpers.rebuild_all_dbs(cls.Session)
     p.unload('datastore')
Ejemplo n.º 14
0
 def teardown_class(cls):
     rebuild_all_dbs(cls.Session)
Ejemplo n.º 15
0
 def teardown_class(cls):
     rebuild_all_dbs(cls.Session)
     p.unload('datastore')
     p.unload('datapusher')
Ejemplo n.º 16
0
 def teardown_class(cls):
     rebuild_all_dbs(cls.Session)
     plugins.unload('datastore')
     plugins.unload('datastorecsw')