-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
69 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
""" | ||
Test Getfeature requests | ||
""" | ||
import pytest | ||
|
||
from pyqgisserver.tests import HTTPTestCase | ||
|
||
xlink = "{http://www.w3.org/1999/xlink}" | ||
|
||
|
||
class Tests(HTTPTestCase): | ||
|
||
@pytest.mark.skip(reason="Wait for proper datasource") | ||
def test_getlegendgraphic_xml(self): | ||
""" Test getlegendgraphic | ||
""" | ||
rv = self.client.get( | ||
"?MAP=france_parts.qgs&SERVICE=WFS&REQUEST=GetLegendGraphic&VERSION=1.0.0" | ||
"&FORMAT=image/png&WIDTH=20&HEIGHT=20&LAYER=france_parts_bordure", | ||
) | ||
assert rv.status_code == 200 | ||
assert rv.headers['Content-Type'].startswith('text/xml;') | ||
|
||
@pytest.mark.skip(reason="Wait for proper datasource") | ||
def test_getlegendgraphic_json(self): | ||
""" Test getlegendgraphic in json format | ||
""" | ||
rv = self.client.get( | ||
"?MAP=france_parts.qgs&SERVICE=WFS&REQUEST=GetLegendGraphic&VERSION=1.0.0" | ||
"&FORMAT=json&WIDTH=20&HEIGHT=20&LAYER=france_parts_bordure", | ||
) | ||
assert rv.status_code == 200 | ||
assert rv.headers['Content-Type'].startswith('text/xml;') |