55from botocore .exceptions import ClientError
66
77from sdgym .run_benchmark .run_benchmark import append_benchmark_run , main
8- from sdgym .run_benchmark .utils import OUTPUT_DESTINATION_AWS , SYNTHESIZERS
8+ from sdgym .run_benchmark .utils import OUTPUT_DESTINATION_AWS , SYNTHESIZERS_SPLIT
99
1010
1111@patch ('sdgym.run_benchmark.run_benchmark.get_s3_client' )
@@ -103,7 +103,13 @@ def test_append_benchmark_run_new_file(
103103@patch ('sdgym.run_benchmark.run_benchmark.benchmark_single_table_aws' )
104104@patch ('sdgym.run_benchmark.run_benchmark.os.getenv' )
105105@patch ('sdgym.run_benchmark.run_benchmark.append_benchmark_run' )
106- def test_main (mock_append_benchmark_run , mock_getenv , mock_benchmark_single_table_aws ):
106+ @patch ('sdgym.run_benchmark.run_benchmark.post_benchmark_launch_message' )
107+ def test_main (
108+ mock_post_benchmark_launch_message ,
109+ mock_append_benchmark_run ,
110+ mock_getenv ,
111+ mock_benchmark_single_table_aws ,
112+ ):
107113 """Test the `main` method."""
108114 # Setup
109115 mock_getenv .side_effect = ['my_access_key' , 'my_secret_key' ]
@@ -116,13 +122,14 @@ def test_main(mock_append_benchmark_run, mock_getenv, mock_benchmark_single_tabl
116122 mock_getenv .assert_any_call ('AWS_ACCESS_KEY_ID' )
117123 mock_getenv .assert_any_call ('AWS_SECRET_ACCESS_KEY' )
118124 expected_calls = []
119- for synthesizer in SYNTHESIZERS :
125+ for synthesizer in SYNTHESIZERS_SPLIT :
120126 expected_calls .append (
121127 call (
122128 output_destination = OUTPUT_DESTINATION_AWS ,
123129 aws_access_key_id = 'my_access_key' ,
124130 aws_secret_access_key = 'my_secret_key' ,
125- synthesizers = [synthesizer ],
131+ synthesizers = synthesizer ,
132+ sdv_datasets = ['expedia_hotel_logs' , 'fake_companies' ],
126133 compute_privacy_score = False ,
127134 )
128135 )
@@ -133,3 +140,4 @@ def test_main(mock_append_benchmark_run, mock_getenv, mock_benchmark_single_tabl
133140 'my_secret_key' ,
134141 date ,
135142 )
143+ mock_post_benchmark_launch_message .assert_called_once_with (date )
0 commit comments