MCPcopy Create free account
hub / github.com/vastsa/FileCodeBox / S3StorageConfigTests

Class S3StorageConfigTests

tests/test_issue_461_s3_addressing.py:15–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13
14
15class S3StorageConfigTests(SettingsOverrideMixin, unittest.TestCase):
16 def test_client_config_uses_path_style_when_configured(self):
17 storage = S3FileStorage.__new__(S3FileStorage)
18 storage.signature_version = "s3v4"
19 storage.addressing_style = "path"
20
21 config = storage._client_config()
22
23 self.assertEqual(config.signature_version, "s3v4")
24 self.assertEqual(config.s3["addressing_style"], "path")
25
26 def test_client_config_ignores_invalid_addressing_style(self):
27 storage = S3FileStorage.__new__(S3FileStorage)
28 storage.signature_version = "s3v4"
29 storage.addressing_style = "invalid"
30
31 config = storage._client_config()
32
33 self.assertIsNone(config.s3)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected