Skip to content

Commit 3e20f16

Browse files
committed
Fix broken test
1 parent a519c9e commit 3e20f16

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

lambdas/filenameprocessor/tests/test_lambda_handler.py

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Tests for lambda_handler"""
22

33
import json
4-
import sys
54
from contextlib import ExitStack
65
from copy import deepcopy
76
from json import loads as json_loads
@@ -778,37 +777,3 @@ def test_unexpected_bucket_name_and_filename_validation_fails(self):
778777
self.assertIn("Unable to process file", args[0])
779778
self.assertIn(invalid_file_key, args)
780779
self.assertIn("unknown-bucket", args)
781-
782-
783-
class TestMainEntryPoint(TestCase):
784-
def test_run_local_constructs_event_and_calls_lambda_handler(self):
785-
test_args = [
786-
"file_name_processor.py",
787-
"--bucket",
788-
"test-bucket",
789-
"--key",
790-
"some/path/file.csv",
791-
]
792-
793-
expected_event = {
794-
"Records": [
795-
{
796-
"s3": {
797-
"bucket": {"name": "test-bucket"},
798-
"object": {"key": "some/path/file.csv"},
799-
}
800-
}
801-
]
802-
}
803-
804-
with (
805-
patch.object(sys, "argv", test_args),
806-
patch("file_name_processor.lambda_handler") as mock_lambda_handler,
807-
patch("file_name_processor.print") as mock_print,
808-
):
809-
import file_name_processor
810-
811-
file_name_processor.run_local()
812-
813-
mock_lambda_handler.assert_called_once_with(event=expected_event, context={})
814-
mock_print.assert_called()

0 commit comments

Comments
 (0)