コード例 #1
0
ファイル: test_execute.py プロジェクト: rbs-pli/pywps-4
 def test_one_string(self):
     request_doc = WPS.Execute(
         OWS.Identifier('foo'),
         WPS.DataInputs(
             WPS.Input(OWS.Identifier('name'),
                       WPS.Data(WPS.LiteralData('foo')))))
     assert get_input_from_xml(request_doc).to_dict() == {'name': 'foo'}
コード例 #2
0
 def test_one_string(self):
     request_doc = WPS.Execute(
         OWS.Identifier('foo'),
         WPS.DataInputs(
             WPS.Input(
                 OWS.Identifier('name'),
                 WPS.Data(WPS.LiteralData('foo')))))
     assert get_input_from_xml(request_doc).to_dict() == {'name': 'foo'}
コード例 #3
0
ファイル: test_execute.py プロジェクト: rbs-pli/pywps-4
 def test_two_strings(self):
     request_doc = WPS.Execute(
         OWS.Identifier('foo'),
         WPS.DataInputs(
             WPS.Input(OWS.Identifier('name'),
                       WPS.Data(WPS.LiteralData('foo'))),
             WPS.Input(OWS.Identifier('name'),
                       WPS.Data(WPS.LiteralData('bar')))))
     rv = get_input_from_xml(request_doc)
     assert rv.getlist('name') == ['foo', 'bar']
コード例 #4
0
 def test_two_strings(self):
     request_doc = WPS.Execute(
         OWS.Identifier('foo'),
         WPS.DataInputs(
             WPS.Input(
                 OWS.Identifier('name'),
                 WPS.Data(WPS.LiteralData('foo'))),
             WPS.Input(
                 OWS.Identifier('name'),
                 WPS.Data(WPS.LiteralData('bar')))))
     rv = get_input_from_xml(request_doc)
     assert rv.getlist('name') == ['foo', 'bar']
コード例 #5
0
ファイル: test_execute.py プロジェクト: rbs-pli/pywps-4
 def test_complex_input(self):
     the_data = E.TheData("hello world")
     request_doc = WPS.Execute(
         OWS.Identifier('foo'),
         WPS.DataInputs(
             WPS.Input(
                 OWS.Identifier('name'),
                 WPS.Data(WPS.ComplexData(the_data,
                                          mimeType='text/foobar')))))
     rv = get_input_from_xml(request_doc)
     assert rv['name'].mime_type == 'text/foobar'
     rv_doc = lxml.etree.parse(rv['name']).getroot()
     assert rv_doc.tag == 'TheData'
     assert rv_doc.text == "hello world"
コード例 #6
0
ファイル: test_execute.py プロジェクト: doclements/pywps-4
 def test_complex_input(self):
     the_data = E.TheData("hello world")
     request_doc = WPS.Execute(
         OWS.Identifier('foo'),
         WPS.DataInputs(
             WPS.Input(
                 OWS.Identifier('name'),
                 WPS.Data(
                     WPS.ComplexData(the_data, mimeType='text/foobar')))))
     rv = get_input_from_xml(request_doc)
     assert rv['name'].mime_type == 'text/foobar'
     rv_doc = lxml.etree.parse(rv['name']).getroot()
     assert rv_doc.tag == 'TheData'
     assert rv_doc.text == "hello world"
コード例 #7
0
 def test_empty(self):
     request_doc = WPS.Execute(OWS.Identifier('foo'))
     assert get_input_from_xml(request_doc) == {}
コード例 #8
0
ファイル: test_execute.py プロジェクト: rbs-pli/pywps-4
 def test_empty(self):
     request_doc = WPS.Execute(OWS.Identifier('foo'))
     assert get_input_from_xml(request_doc) == {}