def setUp(self): self.wps_path = "/ows/wps" settings = { "weaver.url": "", "weaver.wps": True, "weaver.wps_path": self.wps_path, "weaver.wps_metadata_identification_title": "Weaver WPS Test Server", "weaver.wps_metadata_provider_name": WpsAppTest.__name__ } config = get_test_weaver_config(settings=settings) config = setup_config_with_mongodb(config) config = setup_config_with_pywps(config) config = setup_config_with_celery(config) self.process_store = setup_mongodb_processstore(config) self.app = get_test_weaver_app(config=config, settings=settings) # add processes by database Process type self.process_public = WpsTestProcess(identifier="process_public") self.process_private = WpsTestProcess(identifier="process_private") self.process_store.save_process(self.process_public) self.process_store.save_process(self.process_private) self.process_store.set_visibility(self.process_public.identifier, VISIBILITY_PUBLIC) self.process_store.set_visibility(self.process_private.identifier, VISIBILITY_PRIVATE) # add processes by pywps Process type self.process_store.save_process(HelloWPS()) self.process_store.set_visibility(HelloWPS.identifier, VISIBILITY_PUBLIC)
def setUpClass(cls): config = setup_config_with_mongodb(settings=cls.settings) config = setup_config_with_pywps(config) config = setup_config_with_celery(config) config = get_test_weaver_config(config) cls.process_store = setup_mongodb_processstore(config) # force reset cls.job_store = setup_mongodb_jobstore(config) cls.app = get_test_weaver_app(config=config, settings=cls.settings) cls.db = get_db(config) cls.config = config cls.settings.update(cls.config.registry.settings) # back propagate changes