@@ -22,7 +22,7 @@ def setup_method(self):
2222 setup_mock_web_api_server (self )
2323 start_socket_mode_server (self , 3012 )
2424
25- cli_args = [start .__name__ , "--protocol" , "message-boundaries" , "--boundary" , "" ]
25+ cli_args = [start .__file__ , "--protocol" , "message-boundaries" , "--boundary" , "" ]
2626 self .argv_mock = patch .object (sys , "argv" , cli_args )
2727 self .argv_mock .start ()
2828
@@ -41,7 +41,7 @@ def teardown_method(self):
4141 def test_start_script (self , capsys , caplog ):
4242 os .chdir (self .working_directory )
4343
44- runpy .run_module (start .__name__ , run_name = "__main__" )
44+ runpy .run_path (start .__file__ , run_name = "__main__" )
4545
4646 captured_sys = capsys .readouterr ()
4747
@@ -52,7 +52,7 @@ def test_start_with_entrypoint(self, capsys, caplog):
5252 os .environ ["SLACK_APP_PATH" ] = "my_app.py"
5353 os .chdir (self .working_directory )
5454
55- runpy .run_module (start .__name__ , run_name = "__main__" )
55+ runpy .run_path (start .__file__ , run_name = "__main__" )
5656
5757 captured_sys = capsys .readouterr ()
5858
@@ -64,6 +64,6 @@ def test_start_no_entrypoint(self):
6464 os .chdir (working_directory )
6565
6666 with pytest .raises (CliError ) as e :
67- runpy .run_module (start .__name__ , run_name = "__main__" )
67+ runpy .run_path (start .__file__ , run_name = "__main__" )
6868
6969 assert "Could not find app.py file" in str (e .value )
0 commit comments