forked from Open-EO/openeo-grassgis-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_processes.py
50 lines (39 loc) · 1.62 KB
/
test_processes.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
# -*- coding: utf-8 -*-
import unittest
from pprint import pprint
from flask import json
from openeo_grass_gis_driver.test_base import TestBase
__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 ProcessesTestCase(TestBase):
def test_processes(self):
response = self.app.get('/processes', headers=self.auth)
self.assertEqual(response.status_code, 200)
data = json.loads(response.data.decode())
pprint(data)
self.assertEqual(len("processes"), 9)
def test_process_zonal_statistics(self):
response = self.app.get('/processes/zonal_statistics', headers=self.auth)
self.assertEqual(response.status_code, 200)
data = json.loads(response.data.decode())
pprint(data)
def test_process_filter_bbox(self):
response = self.app.get('/processes/filter_bbox', headers=self.auth)
self.assertEqual(response.status_code, 200)
data = json.loads(response.data.decode())
pprint(data)
def test_process_get_data(self):
response = self.app.get('/processes/get_data', headers=self.auth)
self.assertEqual(response.status_code, 200)
data = json.loads(response.data.decode())
pprint(data)
def test_process_NDVI(self):
response = self.app.get('/processes/NDVI', headers=self.auth)
self.assertEqual(response.status_code, 200)
data = json.loads(response.data.decode())
pprint(data)
if __name__ == "__main__":
unittest.main()