docstr: Tests files are uploaded using the supplied s3_key_prefix
docstr_tok: ["Tests","files","are","uploaded","using","the","supplied","s3_key_prefix"]
code: def test_s3_upload(self, mock_s3):
      """
      Tests files are uploaded using the supplied s3_key_prefix
      """
      key_prefix = "some/key/prefix"
      paths = [
          os.path.join("mainfile.txt"),
          os.path.join("some/dir/file.txt"),
          os.path.join("some/other/dir/another.txt"),
      ]
  
      mock_s3.upload_fileobj = MagicMock()
      mock_fopen = mock_open(read_data=b"some data")
  
      with patch("artifact_repository.open", mock_fopen, create=True):
          s3_upload(
              bucket="bucket", s3_key_prefix=key_prefix, paths=paths
          )
          mock_s3.upload_fileobj.assert_has_calls(
              [
                  unittest.mock.call(
                      Fileobj=unittest.mock.ANY,
                      Key="some/key/prefix/mainfile.txt",
                      Bucket="bucket",
                  ),
                  unittest.mock.call(
                      Fileobj=unittest.mock.ANY,
                      Key="some/key/prefix/file.txt",
                      Bucket="bucket",
                  ),
                  unittest.mock.call(
                      Fileobj=unittest.mock.ANY,
                      Key="some/key/prefix/another.txt",
                      Bucket="bucket",
                  ),
              ]
          )
  
imports: import unittest
  from unittest.mock import MagicMock, mock_open, patch
  from artifact_repository import *
label_desc: Use image node_id 33 for calling the TestArtifactRepositoryTool obj's underlying member method code with example usage: obj.test_s3_upload(mock_s3) without return types