Skip to content

Commit 25dbf16

Browse files
authored
#485 fixed Unit Tests - mainly renew URLs (#486)
1 parent 48fb649 commit 25dbf16

4 files changed

Lines changed: 54 additions & 410 deletions

File tree

tests/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Unit Tests
2+
3+
Unit tests are run with the built-in Python module `unittest`.
4+
5+
Fastest way to run, best in a Virtual Environment:
6+
7+
`python3 run_tests.py`
8+
9+
Or using the Docker Image:
10+
11+
`docker run --entrypoint "/run-tests.sh" geopython/geohealthcheck:latest`
12+

tests/data/fixtures.json

Lines changed: 41 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
"pdok"
2727
]
2828
},
29-
"WOUDC WFS": {
29+
"RCE WFS": {
3030
"owner": "admin",
3131
"resource_type": "OGC:WFS",
3232
"active": true,
33-
"title": "WOUDC Web Feature Service",
34-
"url": "http://geo.woudc.org/ows",
33+
"title": "RCE - Rijksdienst Cultureel Erfgoed WFS",
34+
"url": "https://services.rce.geovoorziening.nl/landschapsatlas/wfs",
3535
"tags": [
3636
"ows"
3737
]
@@ -47,45 +47,33 @@
4747
"pdok"
4848
]
4949
},
50-
"WOUDC CSW": {
50+
"PDOK CSW": {
5151
"owner": "admin",
5252
"resource_type": "OGC:CSW",
5353
"active": true,
54-
"title": "WOUDC Catalogue Service",
55-
"url": "http://geo.woudc.org/csw",
54+
"title": "PDOK Catalogue Service",
55+
"url": "https://nationaalgeoregister.nl/geonetwork/srv/dut/csw",
5656
"tags": [
5757
"ows"
5858
]
5959
},
60-
"PDOK CP WMTS": {
60+
"PDOK BRK WMTS": {
6161
"owner": "admin",
6262
"resource_type": "OGC:WMTS",
6363
"active": true,
64-
"title": "Dutch Kadaster PDOK BRT WMTS",
64+
"title": "Dutch Kadaster PDOK BRK WMTS",
6565
"url": "https://service.pdok.nl/kadaster/kadastralekaart/wmts/v5_0",
6666
"tags": [
6767
"ows",
6868
"tiling"
6969
]
7070
},
71-
"PDOK BRT WMTS": {
72-
"owner": "admin",
73-
"resource_type": "OGC:WMTS",
74-
"active": true,
75-
"title": "Dutch PDOK Luchtfoto WMTS",
76-
"url": "https://service.pdok.nl/brt/achtergrondkaart/wmts/v2_0",
77-
"tags": [
78-
"ows",
79-
"tiling",
80-
"pdok"
81-
]
82-
},
8371
"WOUDC LINK": {
8472
"owner": "admin",
8573
"resource_type": "WWW:LINK",
8674
"active": true,
87-
"title": "WOUDC Definitions Service",
88-
"url": "http://geo.woudc.org/def",
75+
"title": "WOUDC Landing Page",
76+
"url": "https://api.woudc.org/",
8977
"tags": []
9078
},
9179
"OPENGEOGROEP TMS": {
@@ -162,8 +150,8 @@
162150
"drilldown_level": "minor"
163151
}
164152
},
165-
"WOUDC WFS - GetCaps": {
166-
"resource": "WOUDC WFS",
153+
"RCE WFS - GetCaps": {
154+
"resource": "RCE WFS",
167155
"probe_class": "GeoHealthCheck.plugins.probe.owsgetcaps.WfsGetCaps",
168156
"parameters": {
169157
"service": "WFS",
@@ -192,24 +180,24 @@
192180
"bbox": ["180635", "455870", "180961", "456050"]
193181
}
194182
},
195-
"WOUDC CSW - GetCaps": {
196-
"resource": "WOUDC CSW",
183+
"PDOK CSW - GetCaps": {
184+
"resource": "PDOK CSW",
197185
"probe_class": "GeoHealthCheck.plugins.probe.owsgetcaps.CswGetCaps",
198186
"parameters": {
199187
"service": "CSW",
200188
"version": "2.0.2"
201189
}
202190
},
203-
"PDOK CP WMTS - GetCaps": {
204-
"resource": "PDOK CP WMTS",
191+
"PDOK BRK WMTS - GetCaps": {
192+
"resource": "PDOK BRK WMTS",
205193
"probe_class": "GeoHealthCheck.plugins.probe.owsgetcaps.WmtsGetCaps",
206194
"parameters": {
207195
"service": "WMTS",
208196
"version": "1.0.0"
209197
}
210198
},
211-
"PDOK CP WMTS - GetTileREST": {
212-
"resource": "PDOK CP WMTS",
199+
"PDOK BRK WMTS - GetTileREST": {
200+
"resource": "PDOK BRK WMTS",
213201
"probe_class": "GeoHealthCheck.plugins.probe.wmts.WmtsGetTile",
214202
"parameters": {
215203
"layers": ["Kadastralekaart"],
@@ -223,8 +211,8 @@
223211
"kvprest": "REST"
224212
}
225213
},
226-
"PDOK CP WMTS - GetTileKVP": {
227-
"resource": "PDOK CP WMTS",
214+
"PDOK BRK WMTS - GetTileKVP": {
215+
"resource": "PDOK BRK WMTS",
228216
"probe_class": "GeoHealthCheck.plugins.probe.wmts.WmtsGetTile",
229217
"parameters": {
230218
"layers": ["Kadastralekaart"],
@@ -238,8 +226,8 @@
238226
"kvprest": "KVP"
239227
}
240228
},
241-
"PDOK BRT WMTS - GetTileAllKVP": {
242-
"resource": "PDOK BRT WMTS",
229+
"PDOK BRK WMTS - GetTileAllKVP": {
230+
"resource": "PDOK BRK WMTS",
243231
"probe_class": "GeoHealthCheck.plugins.probe.wmts.WmtsGetTileAll",
244232
"parameters": {
245233
"layers": ["All layers"],
@@ -310,8 +298,8 @@
310298
"check_class": "GeoHealthCheck.plugins.check.checks.HttpHasImageContentType",
311299
"parameters": {}
312300
},
313-
"WOUDC WFS - GetCaps - XML Parse": {
314-
"probe_vars": "WOUDC WFS - GetCaps",
301+
"RCE WFS - GetCaps - XML Parse": {
302+
"probe_vars": "RCE WFS - GetCaps",
315303
"check_class": "GeoHealthCheck.plugins.check.checks.XmlParse",
316304
"parameters": {}
317305
},
@@ -353,13 +341,13 @@
353341
"strings": ["FeatureCollection"]
354342
}
355343
},
356-
"WOUDC CSW - GetCaps - XML Parse": {
357-
"probe_vars": "WOUDC CSW - GetCaps",
344+
"PDOK CSW - GetCaps - XML Parse": {
345+
"probe_vars": "PDOK CSW - GetCaps",
358346
"check_class": "GeoHealthCheck.plugins.check.checks.XmlParse",
359347
"parameters": {}
360348
},
361-
"PDOK CP WMTS - GetCaps - XML Parse": {
362-
"probe_vars": "PDOK CP WMTS - GetCaps",
349+
"PDOK BRK WMTS - GetCaps - XML Parse": {
350+
"probe_vars": "PDOK BRK WMTS - GetCaps",
363351
"check_class": "GeoHealthCheck.plugins.check.checks.XmlParse",
364352
"parameters": {}
365353
},
@@ -372,7 +360,7 @@
372360
"probe_vars": "WOUDC LINK - PING",
373361
"check_class": "GeoHealthCheck.plugins.check.checks.ContainsStrings",
374362
"parameters": {
375-
"strings": ["RDF>"]
363+
"strings": ["Ozone"]
376364
}
377365
},
378366
"OPENGEOGROEP TMS - HTTP - NoError": {
@@ -397,33 +385,33 @@
397385
"check_class": "GeoHealthCheck.plugins.check.checks.HttpHasImageContentType",
398386
"parameters": {}
399387
},
400-
"PDOK CP WMTS - GetTileREST - No Exception": {
401-
"probe_vars": "PDOK CP WMTS - GetTileREST",
388+
"PDOK BRK WMTS - GetTileREST - No Exception": {
389+
"probe_vars": "PDOK BRK WMTS - GetTileREST",
402390
"check_class": "GeoHealthCheck.plugins.check.checks.NotContainsOwsException",
403391
"parameters": {"strings": ["ExceptionReport>", "ServiceException>"]}
404392
},
405-
"PDOK CP WMTS - GetTileREST - Content Type": {
406-
"probe_vars": "PDOK CP WMTS - GetTileREST",
393+
"PDOK BRK WMTS - GetTileREST - Content Type": {
394+
"probe_vars": "PDOK BRK WMTS - GetTileREST",
407395
"check_class": "GeoHealthCheck.plugins.check.checks.HttpHasImageContentType",
408396
"parameters": {}
409397
},
410-
"PDOK CP WMTS - GetTileKVP - No Exception": {
411-
"probe_vars": "PDOK CP WMTS - GetTileKVP",
398+
"PDOK BRK WMTS - GetTileKVP - No Exception": {
399+
"probe_vars": "PDOK BRK WMTS - GetTileKVP",
412400
"check_class": "GeoHealthCheck.plugins.check.checks.NotContainsOwsException",
413401
"parameters": {"strings": ["ExceptionReport>", "ServiceException>"]}
414402
},
415-
"PDOK CP WMTS - GetTileKVP - Content Type": {
416-
"probe_vars": "PDOK CP WMTS - GetTileKVP",
403+
"PDOK BRK WMTS - GetTileKVP - Content Type": {
404+
"probe_vars": "PDOK BRK WMTS - GetTileKVP",
417405
"check_class": "GeoHealthCheck.plugins.check.checks.HttpHasImageContentType",
418406
"parameters": {}
419407
},
420-
"PDOK BRT WMTS - GetTileAllKVP - No Exception": {
421-
"probe_vars": "PDOK BRT WMTS - GetTileAllKVP",
408+
"PDOK BRK WMTS - GetTileAllKVP - No Exception": {
409+
"probe_vars": "PDOK BRK WMTS - GetTileAllKVP",
422410
"check_class": "GeoHealthCheck.plugins.check.checks.NotContainsOwsException",
423411
"parameters": {"strings": ["ExceptionReport>", "ServiceException>"]}
424412
},
425-
"PDOK BRT WMTS - GetTileAllKVP - Content Type": {
426-
"probe_vars": "PDOK BRT WMTS - GetTileAllKVP",
413+
"PDOK BRK WMTS - GetTileAllKVP - Content Type": {
414+
"probe_vars": "PDOK BRK WMTS - GetTileAllKVP",
427415
"check_class": "GeoHealthCheck.plugins.check.checks.HttpHasImageContentType",
428416
"parameters": {}
429417
}

0 commit comments

Comments
 (0)