24
24
25
25
class ValidatorTest (_test .TestCase ):
26
26
27
- def test_directions_correct_schema (self ):
27
+ @staticmethod
28
+ def test_directions_correct_schema ():
28
29
validator .validator (ENDPOINT_DICT ['directions' ], 'directions' )
29
30
30
31
def test_directions_wrong_schema (self ):
@@ -40,7 +41,8 @@ def test_directions_wrong_schema(self):
40
41
self .assertIn ('unknown field' , str (em ))
41
42
self .assertIn ('max length is 2' , str (em ))
42
43
43
- def test_isochrones_correct_schema (self ):
44
+ @staticmethod
45
+ def test_isochrones_correct_schema ():
44
46
validator .validator (ENDPOINT_DICT ['isochrones' ], 'isochrones' )
45
47
46
48
def test_isochrones_wrong_schema (self ):
@@ -58,7 +60,8 @@ def test_isochrones_wrong_schema(self):
58
60
self .assertIn ('unallowed value' , str (em ))
59
61
self .assertIn ('must be of integer type' , str (em ))
60
62
61
- def test_distance_matrix_correct_schema (self ):
63
+ @staticmethod
64
+ def test_distance_matrix_correct_schema ():
62
65
validator .validator (ENDPOINT_DICT ['distance_matrix' ], 'distance_matrix' )
63
66
64
67
def test_distance_matrix_wrong_schema (self ):
@@ -77,7 +80,8 @@ def test_distance_matrix_wrong_schema(self):
77
80
self .assertIn ('max value is 1' , str (em ))
78
81
self .assertIn ('unknown field' , str (em ))
79
82
80
- def test_search_correct_schema (self ):
83
+ @staticmethod
84
+ def test_search_correct_schema ():
81
85
validator .validator (ENDPOINT_DICT ['pelias_search' ], 'pelias_search' )
82
86
83
87
def test_search_wrong_schema (self ):
@@ -93,7 +97,8 @@ def test_search_wrong_schema(self):
93
97
self .assertIn ("unallowed values ['name']" , str (em ))
94
98
self .assertIn ('must be of integer type' , str (em ))
95
99
96
- def test_autocomplete_correct_schema (self ):
100
+ @staticmethod
101
+ def test_autocomplete_correct_schema ():
97
102
validator .validator (ENDPOINT_DICT ['pelias_autocomplete' ], 'pelias_autocomplete' )
98
103
99
104
def test_autocomplete_wrong_schema (self ):
@@ -107,7 +112,8 @@ def test_autocomplete_wrong_schema(self):
107
112
108
113
self .assertIn ("unallowed values ['name']" , str (em ))
109
114
110
- def test_structured_correct_schema (self ):
115
+ @staticmethod
116
+ def test_structured_correct_schema ():
111
117
validator .validator (ENDPOINT_DICT ['pelias_structured' ], 'pelias_structured' )
112
118
113
119
def test_structured_wrong_schema (self ):
@@ -133,7 +139,8 @@ def test_structured_wrong_schema(self):
133
139
self .assertIn ('must be of integer type' , str (em ))
134
140
self .assertIn ('must be of string type' , str (em ))
135
141
136
- def test_reverse_correct_schema (self ):
142
+ @staticmethod
143
+ def test_reverse_correct_schema ():
137
144
validator .validator (ENDPOINT_DICT ['pelias_reverse' ], 'pelias_reverse' )
138
145
139
146
def test_reverse_wrong_schema (self ):
@@ -149,7 +156,8 @@ def test_reverse_wrong_schema(self):
149
156
self .assertIn ('must be of string type' , str (em ))
150
157
self .assertIn ("unallowed values ['gm']" , str (em ))
151
158
152
- def test_pois_correct_schema (self ):
159
+ @staticmethod
160
+ def test_pois_correct_schema ():
153
161
validator .validator (ENDPOINT_DICT ['pois' ], 'pois' )
154
162
155
163
ENDPOINT_DICT ['pois' ]['geojson' ] = PARAM_GEOJSON_LINE
0 commit comments