예제 #1
0
    def setUp(self):
        def pr1():
            pass

        def pr2():
            pass

        self.client = client_for(
            Service(processes=[
                Process(
                    pr1,
                    "pr1",
                    "Process 1",
                    abstract="Process 1",
                    keywords=["kw1a", "kw1b"],
                    metadata=[Metadata("pr1 metadata")],
                ),
                Process(
                    pr2,
                    "pr2",
                    "Process 2",
                    keywords=["kw2a"],
                    metadata=[Metadata("pr2 metadata")],
                ),
            ]))
예제 #2
0
 def setUp(self):
     configuration.load_configuration()
     configuration.CONFIG.set('server', 'language', 'en-US,fr-CA')
     self.client = client_for(
         Service(processes=[
             Process(
                 lambda: None,
                 "pr1",
                 "Process 1",
                 abstract="Process 1",
                 translations={
                     "fr-CA": {
                         "title": "Processus 1",
                         "abstract": "Processus 1"
                     }
                 },
             ),
             Process(
                 lambda: None,
                 "pr2",
                 "Process 2",
                 abstract="Process 2",
                 translations={"fr-CA": {
                     "title": "Processus 2"
                 }},
             ),
         ]))
예제 #3
0
    def setUp(self):
        def pr1():
            pass

        def pr2():
            pass

        self.client = client_for(
            Service(processes=[
                Process(pr1, 'pr1', 'Process 1'),
                Process(pr2, 'pr2', 'Process 2')
            ]))
예제 #4
0
    def from_json(cls, value):
        """init this request from json back again

        :param value: the json (not string) representation
        """
        process = Process.from_json(value['process'])
        wps_request = WPSRequest()
        wps_request.json = json.loads(value['wps_request'])
        wps_response = ExecuteResponse(wps_request=wps_request,
                                       uuid=process.uuid,
                                       process=process)
        wps_response.store_status_file = True
        new_job = Job(process=Process.from_json(value['process']),
                      wps_request=wps_request,
                      wps_response=wps_response)
        return new_job
예제 #5
0
    def setUp(self):
        def pr1():
            pass

        def pr2():
            pass

        self.client = client_for(
            Service(processes=[
                Process(pr1,
                        'pr1',
                        'Process 1',
                        metadata=[Metadata('pr1 metadata')]),
                Process(pr2,
                        'pr2',
                        'Process 2',
                        metadata=[Metadata('pr2 metadata')])
            ]))
예제 #6
0
    def setUp(self):
        def pr1():
            pass

        def pr2():
            pass

        self.client = client_for(
            Service(processes=[
                Process(pr1,
                        'pr1',
                        'Process 1',
                        abstract='Process 1',
                        keywords=['kw1a', 'kw1b'],
                        metadata=[Metadata('pr1 metadata')]),
                Process(pr2,
                        'pr2',
                        'Process 2',
                        keywords=['kw2a'],
                        metadata=[Metadata('pr2 metadata')])
            ]))