@@ -34,18 +34,28 @@ def test_function_index(app):
3434 response = app .get ("/functions.json" )
3535 assert response .status_code == 200
3636 body = response .json ()
37- assert len (body ) == 2
38- assert body [0 ]["id" ] == "squares"
39- assert body [0 ]["function_name" ] == "squares"
40- assert body [0 ]["bounds" ]
41- assert body [0 ]["tileurl" ]
42- assert "options" not in body [0 ]
37+ assert len (body ) == 3
38+
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
45+
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
4352
44- assert body [1 ]["id" ] == "squares2"
45- assert body [0 ]["function_name" ] == "squares"
46- assert body [1 ]["bounds" ] == [0.0 , 0.0 , 180.0 , 90.0 ]
47- assert body [1 ]["tileurl" ]
48- assert body [1 ]["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 }]
4959
5060
5161def test_function_info (app ):
0 commit comments