File: test_wps_describeprocess_language.py

package info (click to toggle)
owslib 0.23.0-1%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 11,176 kB
  • sloc: xml: 137,886; python: 20,041; makefile: 167; sh: 11
file content (18 lines) | stat: -rw-r--r-- 511 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from owslib.wps import WebProcessingService
import owslib.wps


def test_wps_describeprocess_language(monkeypatch):

    def mock_open_url(*args, **kwargs):
        assert 'language=fr-CA' in args[1]

        class FakeResponse:
            def read(self):
                return b'<xml></xml>'

        return FakeResponse()

    monkeypatch.setattr(owslib.wps, "openURL", mock_open_url)
    wps = WebProcessingService('http://www.example.com', language='fr-CA', skip_caps=True)
    wps.describeprocess('all')