-
Notifications
You must be signed in to change notification settings - Fork 7
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
37 additions
and
23 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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import io | ||
import logging | ||
|
||
from PIL import Image | ||
|
||
from test.utils import _build_query_string | ||
|
||
from PIL import Image | ||
|
||
LOGGER = logging.getLogger('server') | ||
|
||
__copyright__ = 'Copyright 2023, 3Liz' | ||
__copyright__ = 'Copyright 2024, 3Liz' | ||
__license__ = 'GPL version 3' | ||
__email__ = '[email protected]' | ||
|
||
|
@@ -31,11 +31,11 @@ | |
|
||
def test_categorized_symbol(client): | ||
""" Test categorized symbol for layer. """ | ||
project = client.getproject(PROJECT) | ||
project = client.get_project(PROJECT) | ||
|
||
qs = dict(BASE_QUERY) | ||
qs['LAYERS'] = 'categorized' | ||
rv = client.getWithProject(_build_query_string(qs), project) | ||
rv = client.get_with_project(_build_query_string(qs), project) | ||
assert rv.status_code == 200 | ||
assert rv.headers.get('Content-Type', '').find('image/png') == 0 | ||
|
||
|
@@ -56,7 +56,7 @@ def test_categorized_symbol(client): | |
qs['LAYERS'] = 'categorized' | ||
qs['LEGEND_ON'] = 'categorized:1' | ||
qs['LEGEND_OFF'] = 'categorized:0,2,3,4' | ||
rv = client.getWithProject(_build_query_string(qs), project) | ||
rv = client.get_with_project(_build_query_string(qs), project) | ||
assert rv.status_code == 200 | ||
assert rv.headers.get('Content-Type', '').find('image/png') == 0 | ||
|
||
|
@@ -76,7 +76,7 @@ def test_categorized_symbol(client): | |
|
||
qs = dict(BASE_QUERY) | ||
qs['LAYERS'] = 'categorized' | ||
rv = client.getWithProject(_build_query_string(qs), project) | ||
rv = client.get_with_project(_build_query_string(qs), project) | ||
assert rv.status_code == 200 | ||
assert rv.headers.get('Content-Type', '').find('image/png') == 0 | ||
|
||
|
@@ -97,11 +97,11 @@ def test_categorized_symbol(client): | |
|
||
def test_simple_rule_based(client): | ||
""" Test rule based layer, simple conversion from categorized. """ | ||
project = client.getproject(PROJECT) | ||
project = client.get_project(PROJECT) | ||
|
||
qs = dict(BASE_QUERY) | ||
qs['LAYERS'] = 'rule_based' | ||
rv = client.getWithProject(_build_query_string(qs), project) | ||
rv = client.get_with_project(_build_query_string(qs), project) | ||
assert rv.status_code == 200 | ||
assert rv.headers.get('Content-Type', '').find('image/png') == 0 | ||
|
||
|
@@ -122,7 +122,7 @@ def test_simple_rule_based(client): | |
qs['LAYERS'] = 'rule_based' | ||
qs['LEGEND_ON'] = 'rule_based:{49db22fd-3aed-495d-9140-4b82f50fdcfd}' | ||
qs['LEGEND_OFF'] = 'rule_based:{1e75ef9b-1c18-46c1-b7f7-b16efc5bb791},{37b9b766-5309-4617-b0a4-1122168cbfd0},{bd0ace82-eee5-46c3-ad70-f8ecb7d50bb3},{77b34ffc-2198-4450-8e4d-270df282a81b}' | ||
rv = client.getWithProject(_build_query_string(qs), project) | ||
rv = client.get_with_project(_build_query_string(qs), project) | ||
assert rv.status_code == 200 | ||
assert rv.headers.get('Content-Type', '').find('image/png') == 0 | ||
|
||
|
@@ -142,7 +142,7 @@ def test_simple_rule_based(client): | |
|
||
qs = dict(BASE_QUERY) | ||
qs['LAYERS'] = 'categorized' | ||
rv = client.getWithProject(_build_query_string(qs), project) | ||
rv = client.get_with_project(_build_query_string(qs), project) | ||
assert rv.status_code == 200 | ||
assert rv.headers.get('Content-Type', '').find('image/png') == 0 | ||
|
||
|