def test_get_file_name(self, mock_os): FileUtils.get_file_name('/tmp/invented_file.jpg') mock_os.assert_called_with('/tmp/invented_file.jpg')
def _set_event_params(self): self.bucket_arn = self.event_records['s3']['bucket']['arn'] self.bucket_name = self.event_records['s3']['bucket']['name'] self.object_key = unquote_plus( self.event_records['s3']['object']['key']) self.file_name = FileUtils.get_file_name(self.object_key)