@@ -82,19 +82,15 @@ def test_get_attributes(token, client, schemas_simple):
8282 False ,
8383 None ,
8484 False ,
85- [{ "text" : "0" , "value" : 0 }, { "text" : "1" , "value" : 1 }] ,
85+ None ,
8686 ],
8787 [
8888 "b_id" ,
8989 "int" ,
9090 False ,
9191 None ,
9292 False ,
93- [
94- {"text" : "10" , "value" : 10 },
95- {"text" : "11" , "value" : 11 },
96- {"text" : "21" , "value" : 21 },
97- ],
93+ None ,
9894 ],
9995 ],
10096 "secondary" : [
@@ -104,17 +100,50 @@ def test_get_attributes(token, client, schemas_simple):
104100 False ,
105101 None ,
106102 False ,
107- [
108- {"text" : "Raphael" , "value" : "Raphael" },
109- {"text" : "Bernie" , "value" : "Bernie" },
110- ],
103+ None ,
111104 ],
112105 [
113106 "b_number" ,
114107 "float" ,
115108 False ,
116109 None ,
117110 False ,
111+ None ,
112+ ],
113+ ],
114+ },
115+ }
116+
117+ assert expected_json == REST_response .get_json ()
118+
119+
120+ def test_get_uniques (token , client , schemas_simple ):
121+ REST_response = client .get (
122+ "/query1/uniques" , headers = dict (Authorization = f"Bearer { token } " )
123+ )
124+
125+ expected_json = {
126+ "unique_values" : {
127+ "primary" : [
128+ [
129+ [{"text" : "0" , "value" : 0 }, {"text" : "1" , "value" : 1 }],
130+ ],
131+ [
132+ [
133+ {"text" : "10" , "value" : 10 },
134+ {"text" : "11" , "value" : 11 },
135+ {"text" : "21" , "value" : 21 },
136+ ]
137+ ],
138+ ],
139+ "secondary" : [
140+ [
141+ [
142+ {"text" : "Raphael" , "value" : "Raphael" },
143+ {"text" : "Bernie" , "value" : "Bernie" },
144+ ],
145+ ],
146+ [
118147 [
119148 {"text" : "22.12" , "value" : 22.12 },
120149 {"text" : "-1.21" , "value" : - 1.21 },
0 commit comments