Esempio 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')
 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')
    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()
Esempio n. 4
0
 def teardown_class(cls):
     rebuild_all_dbs(cls.Session)
     p.unload("datastore")
Esempio n. 5
0
File: test.py Progetto: Hoedic/ckan
 def teardown_class(cls):
     rebuild_all_dbs(cls.Session)
     p.unload('datastore')
     p.unload('datapusher')
Esempio n. 6
0
 def teardown_class(cls):
     rebuild_all_dbs(cls.Session)
Esempio n. 7
0
 def teardown_class(cls):
     rebuild_all_dbs(cls.Session)
     plugins.unload('datastore')
     plugins.unload('datastorecsw')
Esempio n. 8
0
 def teardown_class(cls):
     helpers.rebuild_all_dbs(cls.Session)
     p.unload('datastore')
     config.clear()
     config.update(cls._original_config)
Esempio n. 9
0
 def teardown_class(cls):
     helpers.rebuild_all_dbs(cls.Session)
     p.unload('datastore')
Esempio n. 10
0
 def teardown_class(cls):
     p.unload('datastore')
     rebuild_all_dbs(cls.Session)
Esempio 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)
Esempio n. 13
0
 def teardown_class(cls):
     helpers.rebuild_all_dbs(cls.Session)
     p.unload('datastore')
Esempio n. 14
0
 def teardown_class(cls):
     rebuild_all_dbs(cls.Session)
Esempio n. 15
0
 def teardown_class(cls):
     rebuild_all_dbs(cls.Session)
     p.unload('datastore')
     p.unload('datapusher')
Esempio n. 16
0
 def teardown_class(cls):
     rebuild_all_dbs(cls.Session)
     plugins.unload('datastore')
     plugins.unload('datastorecsw')