| 5 | |
| 6 | |
| 7 | class FakeS3Client: |
| 8 | def __init__(self, list_response): |
| 9 | self.list_response = list_response |
| 10 | self.head_calls = 0 |
| 11 | |
| 12 | async def __aenter__(self): |
| 13 | return self |
| 14 | |
| 15 | async def __aexit__(self, exc_type, exc, traceback): |
| 16 | return False |
| 17 | |
| 18 | async def head_object(self, **kwargs): |
| 19 | self.head_calls += 1 |
| 20 | raise RuntimeError("head not supported") |
| 21 | |
| 22 | async def list_objects_v2(self, **kwargs): |
| 23 | return self.list_response |
| 24 | |
| 25 | |
| 26 | class S3FileExistsTests(unittest.TestCase): |
no outgoing calls