forked from Open-EO/openeo-grassgis-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_process_graph_validation.py
72 lines (58 loc) · 2.86 KB
/
test_process_graph_validation.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# -*- coding: utf-8 -*-
import unittest
from flask import json
from openeo_grass_gis_driver.test_base import TestBase
from openeo_grass_gis_driver.utils.process_graph_examples_v03 import *
__license__ = "Apache License, Version 2.0"
__author__ = "Sören Gebbert"
__copyright__ = "Copyright 2018, Sören Gebbert, mundialis"
__maintainer__ = "Soeren Gebbert"
__email__ = "soerengebbert@googlemail.com"
class GraphValidationTestCase(TestBase):
def test_1_graph_filter_bbox(self):
"""Run the validation test
"""
response = self.app.post('/validation', data=json.dumps(FILTER_BOX), content_type="application/json", headers=self.auth)
self.assertEqual(response.status_code, 204)
def test_2_graph_ndvi(self):
"""Run the validation test
"""
response = self.app.post('/validation', data=json.dumps(NDVI_1), content_type="application/json", headers=self.auth)
self.assertEqual(response.status_code, 204)
def test_3_graph_get_data_1(self):
"""Run the validation test
"""
response = self.app.post('/validation', data=json.dumps(GET_DATA_1), content_type="application/json", headers=self.auth)
self.assertEqual(response.status_code, 204)
def test_4_graph_get_data_3(self):
"""Run the validation test
"""
response = self.app.post('/validation', data=json.dumps(GET_DATA_3), content_type="application/json", headers=self.auth)
self.assertEqual(response.status_code, 204)
def test_5_graph_daterange(self):
"""Run the validation test
"""
response = self.app.post('/validation', data=json.dumps(DATERANGE), content_type="application/json", headers=self.auth)
self.assertEqual(response.status_code, 204)
def test_6_graph_zonal_statistics(self):
"""Run the validation test
"""
response = self.app.post('/validation', data=json.dumps(ZONAL_STATISTICS), content_type="application/json", headers=self.auth)
self.assertEqual(response.status_code, 204)
def test_7_graph_zonal_statistics_single(self):
"""Run the validation test
"""
response = self.app.post('/validation', data=json.dumps(ZONAL_STATISTICS_SINGLE), content_type="application/json", headers=self.auth)
self.assertEqual(response.status_code, 204)
def test_8_graph_ndvi_3(self):
"""Run the validation test
"""
response = self.app.post('/validation', data=json.dumps(NDVI_3), content_type="application/json", headers=self.auth)
self.assertEqual(response.status_code, 204)
def test_9_graph_raster_export(self):
"""Run the validation test
"""
response = self.app.post('/validation', data=json.dumps(RASTER_EXPORT), content_type="application/json", headers=self.auth)
self.assertEqual(response.status_code, 204)
if __name__ == "__main__":
unittest.main()