File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 1+ import json
12import logging
23import random
34from datetime import datetime , timedelta , timezone
@@ -272,6 +273,19 @@ def test_midnight_heartbeats(aw_client, bucket):
272273
273274def test_settings (aw_client ):
274275 aw_client .set_setting ("test" , "test" )
276+ aw_client .set_setting ("list" , json .dumps ([1 , 2 , 3 ]))
277+ aw_client .set_setting ("dict" , json .dumps ({"a" : 1 , "b" : 2 }))
278+
279+ # check set
275280 assert aw_client .get_setting ("test" ) == "test"
281+ assert json .loads (aw_client .get_setting ("list" )) == [1 , 2 , 3 ]
282+ assert json .loads (aw_client .get_setting ("dict" )) == {"a" : 1 , "b" : 2 }
283+
284+ # check unset
276285 assert aw_client .get_setting ("test2" ) is None
277- assert aw_client .get_setting () == {"test" : "test" }
286+
287+ # check get all
288+ settings = aw_client .get_setting ()
289+ assert settings ["test" ] == "test"
290+ assert json .loads (settings ["list" ]) == [1 , 2 , 3 ]
291+ assert json .loads (settings ["dict" ]) == {"a" : 1 , "b" : 2 }
You can’t perform that action at this time.
0 commit comments