@@ -10,15 +10,13 @@ def test_invalid_file_extension():
1010 # Test extension not matching .json or .yaml
1111 with pytest .raises (
1212 ValueError ,
13- match = r"Error: Configuration file extension"
14- " must be .json or .yaml for:.*" ,
13+ match = r"Error: Configuration file extension" " must be .json or .yaml for:.*" ,
1514 ):
1615 BlueButton (config = "file.xxx" )
1716
1817
1918def test_read_config_json_equals_yaml ():
20- bb = BlueButton (config = CONFIGS_DIR +
21- "json/bluebutton-sample-config-valid-sbx.json" )
19+ bb = BlueButton (config = CONFIGS_DIR + "json/bluebutton-sample-config-valid-sbx.json" )
2220
2321 # Test dict's are equal for both JSON & YAML
2422 assert bb ._read_config (
@@ -30,17 +28,17 @@ def test_read_config_json_equals_yaml():
3028
3129def test_valid_config ():
3230 # valid config sbx
33- bb = BlueButton (config = CONFIGS_DIR +
34- "json/bluebutton-sample-config-valid-sbx.json" )
31+ bb = BlueButton (config = CONFIGS_DIR + "json/bluebutton-sample-config-valid-sbx.json" )
3532 assert bb .base_url == "https://sandbox.bluebutton.cms.gov"
3633 assert bb .client_id == "<your BB2 client_id here>"
3734 assert bb .client_secret == "<your BB2 client_secret here>"
3835 assert bb .callback_url == "https://www.fake-sandbox.com/your/callback/here"
3936 assert bb .version == 1
4037
4138 # valid config prod
42- bb = BlueButton (config = CONFIGS_DIR +
43- "json/bluebutton-sample-config-valid-prod.json" )
39+ bb = BlueButton (
40+ config = CONFIGS_DIR + "json/bluebutton-sample-config-valid-prod.json"
41+ )
4442 assert bb .base_url == "https://api.bluebutton.cms.gov"
4543 assert bb .client_id == "<your BB2 client_id here>"
4644 assert bb .client_secret == "<your BB2 client_secret here>"
@@ -80,8 +78,7 @@ def test_config_setting_missing():
8078 for setting , file_name in [
8179 ["client_id" , "json/bluebutton-sample-config-missing-id.json" ],
8280 ["client_secret" , "json/bluebutton-sample-config-missing-secret.json" ],
83- ["callback_url" ,
84- "json/bluebutton-sample-config-missing-callback.json" ],
81+ ["callback_url" , "json/bluebutton-sample-config-missing-callback.json" ],
8582 ]:
8683 with pytest .raises (
8784 ValueError ,
@@ -92,6 +89,7 @@ def test_config_setting_missing():
9289
9390
9491def test_config_version_missing_defaults_to_v2 ():
95- bb = BlueButton (config = CONFIGS_DIR +
96- "json/bluebutton-sample-config-missing-version.json" )
92+ bb = BlueButton (
93+ config = CONFIGS_DIR + "json/bluebutton-sample-config-missing-version.json"
94+ )
9795 assert bb .version == 2
0 commit comments