def test_path_join(self): self.assertEqual(S3Output.join("s3://xyz/", "/bar/"), "s3://xyz/bar") self.assertEqual(S3Output.join("s3://xyz/", "/bar/", "foo"), "s3://xyz/bar/foo") self.assertEqual(S3Output.join("s3://xyz/xyz/", "/bar/"), "s3://xyz/xyz/bar")
def test_path_join(self): self.assertEqual(S3Output.join('s3://xyz/', '/bar/'), 's3://xyz/bar') self.assertEqual(S3Output.join('s3://xyz/', '/bar/', 'foo'), 's3://xyz/bar/foo') self.assertEqual(S3Output.join('s3://xyz/xyz/', '/bar/'), 's3://xyz/xyz/bar')
def test_path_join(self): self.assertEqual( S3Output.join('s3://xyz/', '/bar/'), 's3://xyz/bar') self.assertEqual( S3Output.join('s3://xyz/', '/bar/', 'foo'), 's3://xyz/bar/foo') self.assertEqual( S3Output.join('s3://xyz/xyz/', '/bar/'), 's3://xyz/xyz/bar')
def get_s3_output(self): output = S3Output( ExecutionContext( None, Bag(name="xyz"), Config.empty(output_dir="s3://cloud-custodian/policies"))) self.addCleanup(shutil.rmtree, output.root_dir) return output