@@ -36,23 +36,26 @@ def test_function_index(app):
36
36
body = response .json ()
37
37
assert len (body ) == 3
38
38
39
- assert body [0 ]["id" ] == "landsat_poly_centroid"
40
- assert body [0 ]["function_name" ] == "landsat_poly_centroid"
41
- assert body [0 ]["bounds" ]
42
- assert body [0 ]["tileurl" ]
43
- assert "options" not in body [0 ]
39
+ func = list (filter (lambda x : x ["id" ] == "landsat_poly_centroid" , body ))[0 ]
40
+ assert func ["id" ] == "landsat_poly_centroid"
41
+ assert func ["function_name" ] == "landsat_poly_centroid"
42
+ assert func ["bounds" ]
43
+ assert func ["tileurl" ]
44
+ assert "options" not in func
44
45
45
- assert body [1 ]["id" ] == "squares"
46
- assert body [1 ]["function_name" ] == "squares"
47
- assert body [1 ]["bounds" ]
48
- assert body [1 ]["tileurl" ]
49
- assert "options" not in body [1 ]
46
+ func = list (filter (lambda x : x ["id" ] == "squares" , body ))[0 ]
47
+ assert func ["id" ] == "squares"
48
+ assert func ["function_name" ] == "squares"
49
+ assert func ["bounds" ]
50
+ assert func ["tileurl" ]
51
+ assert "options" not in func
50
52
51
- assert body [2 ]["id" ] == "squares2"
52
- assert body [2 ]["function_name" ] == "squares"
53
- assert body [2 ]["bounds" ] == [0.0 , 0.0 , 180.0 , 90.0 ]
54
- assert body [2 ]["tileurl" ]
55
- assert body [2 ]["options" ] == [{"name" : "depth" , "default" : 2 }]
53
+ func = list (filter (lambda x : x ["id" ] == "squares2" , body ))[0 ]
54
+ assert func ["id" ] == "squares2"
55
+ assert func ["function_name" ] == "squares"
56
+ assert func ["bounds" ] == [0.0 , 0.0 , 180.0 , 90.0 ]
57
+ assert func ["tileurl" ]
58
+ assert func ["options" ] == [{"name" : "depth" , "default" : 2 }]
56
59
57
60
58
61
def test_function_info (app ):
0 commit comments