@@ -292,8 +292,7 @@ def test_upsert_flag_create_new_in_test_environment(self, mock_requests, mock_st
292292 'STATSIG-API-VERSION' : STATSIG_API_VERSION ,
293293 'Content-Type' : 'application/json' ,
294294 },
295- data = json .dumps (
296- {
295+ json = {
297296 'name' : 'new-test-flag' ,
298297 'description' : 'Feature gate managed by CDK for new-test-flag feature' ,
299298 'isEnabled' : True ,
@@ -312,8 +311,7 @@ def test_upsert_flag_create_new_in_test_environment(self, mock_requests, mock_st
312311 'passPercentage' : 100 , # Always 100 for test environment
313312 }
314313 ],
315- }
316- ),
314+ },
317315 timeout = 30 ,
318316 )
319317
@@ -346,8 +344,7 @@ def test_upsert_flag_create_new_in_test_environment_no_attributes(self, mock_req
346344 'STATSIG-API-VERSION' : STATSIG_API_VERSION ,
347345 'Content-Type' : 'application/json' ,
348346 },
349- data = json .dumps (
350- {
347+ json = {
351348 'name' : 'simple-flag' ,
352349 'description' : 'Feature gate managed by CDK for simple-flag feature' ,
353350 'isEnabled' : True ,
@@ -359,8 +356,7 @@ def test_upsert_flag_create_new_in_test_environment_no_attributes(self, mock_req
359356 'passPercentage' : 0 ,
360357 }
361358 ],
362- }
363- ),
359+ },
364360 timeout = 30 ,
365361 )
366362
@@ -428,8 +424,7 @@ def test_upsert_flag_prod_environment_auto_enable_false_no_existing_flag(self, m
428424 'STATSIG-API-VERSION' : STATSIG_API_VERSION ,
429425 'Content-Type' : 'application/json' ,
430426 },
431- data = json .dumps (
432- {
427+ json = {
433428 'name' : 'prod-flag' ,
434429 'description' : 'Feature gate managed by CDK for prod-flag feature' ,
435430 'isEnabled' : True ,
@@ -441,8 +436,7 @@ def test_upsert_flag_prod_environment_auto_enable_false_no_existing_flag(self, m
441436 'passPercentage' : 0 , # Disabled in prod when auto_enable=False
442437 }
443438 ],
444- }
445- ),
439+ },
446440 timeout = 30 ,
447441 )
448442
@@ -475,8 +469,7 @@ def test_upsert_flag_prod_environment_auto_enable_true_no_existing_flag(self, mo
475469 'STATSIG-API-VERSION' : STATSIG_API_VERSION ,
476470 'Content-Type' : 'application/json' ,
477471 },
478- data = json .dumps (
479- {
472+ json = {
480473 'name' : 'prod-flag' ,
481474 'description' : 'Feature gate managed by CDK for prod-flag feature' ,
482475 'isEnabled' : True ,
@@ -488,8 +481,7 @@ def test_upsert_flag_prod_environment_auto_enable_true_no_existing_flag(self, mo
488481 'passPercentage' : 100 ,
489482 }
490483 ],
491- }
492- ),
484+ },
493485 timeout = 30 ,
494486 )
495487
@@ -535,8 +527,7 @@ def test_upsert_flag_beta_environment_auto_enable_false_no_existing_rule_create_
535527 'STATSIG-API-VERSION' : STATSIG_API_VERSION ,
536528 'Content-Type' : 'application/json' ,
537529 },
538- data = json .dumps (
539- {
530+ json = {
540531 'id' : 'existing-flag' ,
541532 'name' : 'existing-flag' ,
542533 'rules' : [
@@ -553,8 +544,7 @@ def test_upsert_flag_beta_environment_auto_enable_false_no_existing_rule_create_
553544 'passPercentage' : 0 ,
554545 },
555546 ],
556- }
557- ),
547+ },
558548 timeout = 30 ,
559549 )
560550
@@ -601,8 +591,7 @@ def test_upsert_flag_prod_environment_existing_flag_auto_enable_true(self, mock_
601591 'STATSIG-API-VERSION' : STATSIG_API_VERSION ,
602592 'Content-Type' : 'application/json' ,
603593 },
604- data = json .dumps (
605- {
594+ json = {
606595 'id' : 'gate-existing-prod' ,
607596 'name' : 'existing-prod-flag' ,
608597 'rules' : [
@@ -626,8 +615,7 @@ def test_upsert_flag_prod_environment_existing_flag_auto_enable_true(self, mock_
626615 'passPercentage' : 100 ,
627616 },
628617 ],
629- }
630- ),
618+ },
631619 timeout = 30 ,
632620 )
633621
@@ -851,8 +839,7 @@ def test_delete_flag_multiple_rules_removes_current_rule_only(self, mock_request
851839 'STATSIG-API-VERSION' : STATSIG_API_VERSION ,
852840 'Content-Type' : 'application/json' ,
853841 },
854- data = json .dumps (
855- {
842+ json = {
856843 'id' : 'gate-delete-multi' ,
857844 'name' : 'delete-multi-flag' ,
858845 'rules' : [
@@ -869,8 +856,7 @@ def test_delete_flag_multiple_rules_removes_current_rule_only(self, mock_request
869856 'passPercentage' : 100 ,
870857 },
871858 ],
872- }
873- ),
859+ },
874860 timeout = 30 ,
875861 )
876862 mock_requests .delete .assert_not_called ()
@@ -1059,8 +1045,7 @@ def test_upsert_flag_custom_attributes_as_string(self, mock_requests, mock_stats
10591045 'STATSIG-API-VERSION' : STATSIG_API_VERSION ,
10601046 'Content-Type' : 'application/json' ,
10611047 },
1062- data = json .dumps (
1063- {
1048+ json = {
10641049 'name' : 'string-attrs-flag' ,
10651050 'description' : 'Feature gate managed by CDK for string-attrs-flag feature' ,
10661051 'isEnabled' : True ,
@@ -1080,8 +1065,7 @@ def test_upsert_flag_custom_attributes_as_string(self, mock_requests, mock_stats
10801065 'passPercentage' : 0 , # Always 100 for test environment
10811066 }
10821067 ],
1083- }
1084- ),
1068+ },
10851069 timeout = 30 ,
10861070 )
10871071
@@ -1115,8 +1099,7 @@ def test_upsert_flag_custom_attributes_as_list(self, mock_requests, mock_statsig
11151099 'STATSIG-API-VERSION' : STATSIG_API_VERSION ,
11161100 'Content-Type' : 'application/json' ,
11171101 },
1118- data = json .dumps (
1119- {
1102+ json = {
11201103 'name' : 'list-attrs-flag' ,
11211104 'description' : 'Feature gate managed by CDK for list-attrs-flag feature' ,
11221105 'isEnabled' : True ,
@@ -1135,8 +1118,7 @@ def test_upsert_flag_custom_attributes_as_list(self, mock_requests, mock_statsig
11351118 'passPercentage' : 0 ,
11361119 }
11371120 ],
1138- }
1139- ),
1121+ },
11401122 timeout = 30 ,
11411123 )
11421124
0 commit comments