MCPcopy
hub / github.com/aws/aws-cli / setUp

Method setUp

tests/unit/s3transfer/test_upload.py:58–77  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

56
57class BaseUploadTest(BaseTaskTest):
58 def setUp(self):
59 super().setUp()
60 self.bucket = 'mybucket'
61 self.key = 'foo'
62 self.osutil = OSUtils()
63
64 self.tempdir = tempfile.mkdtemp()
65 self.filename = os.path.join(self.tempdir, 'myfile')
66 self.content = b'my content'
67 self.subscribers = []
68
69 with open(self.filename, 'wb') as f:
70 f.write(self.content)
71
72 # A list to keep track of all of the bodies sent over the wire
73 # and their order.
74 self.sent_bodies = []
75 self.client.meta.events.register(
76 'before-parameter-build.s3.*', self.collect_body
77 )
78
79 def tearDown(self):
80 super().tearDown()

Callers 5

setUpMethod · 0.45
setUpMethod · 0.45
setUpMethod · 0.45
setUpMethod · 0.45
setUpMethod · 0.45

Calls 3

OSUtilsClass · 0.90
writeMethod · 0.45
registerMethod · 0.45

Tested by

no test coverage detected