File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ def test_empty_config():
66 reload_result = empty_ff .reload_feature_flags ()
77 assert reload_result is False
88
9+ assert empty_ff .conf_from_dict is None
10+ assert empty_ff .conf_from_json is None
11+ assert empty_ff .conf_from_url is None
12+
913
1014def test_feature_flag_wrapper (featureflags ):
1115 assert featureflags .get_features ().get ("non_existing" , None ) is None
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ def test_ff_from_dict(featureflags):
1414 )
1515
1616 assert type (featureflags .get_features ()) is dict
17+ assert featureflags .conf_from_dict is not None
18+
1719 assert featureflags .get_features () == {
1820 "json_only" : False ,
1921 "file_1" : True ,
Original file line number Diff line number Diff line change 11def test_ff_from_json (featureflags ):
22 featureflags .load_conf_from_json ("tests/features.json" )
3+
34 assert type (featureflags .get_features ()) is dict
5+ assert featureflags .conf_from_json is not None
6+
47 assert featureflags .get_features () == {
58 "json_only" : False ,
69 "file_1" : True ,
710 "file_2" : False ,
811 "file_3" : True ,
9- "file_4" : True
12+ "file_4" : True ,
1013 }
1114
1215
Original file line number Diff line number Diff line change 33
44def test_ff_from_url (featureflags ):
55 featureflags .load_conf_from_url ("https://pastebin.com/raw/4Ai3j2DC" )
6+
67 assert type (featureflags .get_features ()) is dict
8+ assert featureflags .conf_from_url is not None
9+
710 assert featureflags .get_features () == {
811 "web_only" : False ,
912 "web_1" : True ,
Original file line number Diff line number Diff line change @@ -9,11 +9,11 @@ def test_empty_config():
99def test_config_from_dict (featureflags ):
1010 conf_from_dict = featureflags .load_conf_from_dict (
1111 {
12- "json_only " : False ,
13- "file_1 " : True ,
14- "file_2 " : False ,
15- "file_3 " : True ,
16- "file_4 " : True ,
12+ "dict_only " : False ,
13+ "feat_1 " : True ,
14+ "feat_2 " : False ,
15+ "feat_3 " : True ,
16+ "feat_4 " : True ,
1717 }
1818 )
1919 assert type (conf_from_dict ) is bool
You can’t perform that action at this time.
0 commit comments