Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Unified Diff: tools/telemetry/third_party/gsutil/third_party/boto/tests/unit/s3/test_cors_configuration.py

Issue 1260493004: Revert "Add gsutil 4.13 to telemetry/third_party" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/third_party/gsutil/third_party/boto/tests/unit/s3/test_cors_configuration.py
diff --git a/tools/telemetry/third_party/gsutil/third_party/boto/tests/unit/s3/test_cors_configuration.py b/tools/telemetry/third_party/gsutil/third_party/boto/tests/unit/s3/test_cors_configuration.py
deleted file mode 100644
index 8f6980364ca2c93a60898575ba4e6084c95ecdf6..0000000000000000000000000000000000000000
--- a/tools/telemetry/third_party/gsutil/third_party/boto/tests/unit/s3/test_cors_configuration.py
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/usr/bin/env python
-
-import unittest
-from boto.s3.cors import CORSConfiguration
-
-CORS_BODY_1 = (
- '<CORSConfiguration>'
- '<CORSRule>'
- '<AllowedMethod>PUT</AllowedMethod>'
- '<AllowedMethod>POST</AllowedMethod>'
- '<AllowedMethod>DELETE</AllowedMethod>'
- '<AllowedOrigin>http://www.example.com</AllowedOrigin>'
- '<AllowedHeader>*</AllowedHeader>'
- '<ExposeHeader>x-amz-server-side-encryption</ExposeHeader>'
- '<MaxAgeSeconds>3000</MaxAgeSeconds>'
- '<ID>foobar_rule</ID>'
- '</CORSRule>'
- '</CORSConfiguration>')
-
-CORS_BODY_2 = (
- '<CORSConfiguration>'
- '<CORSRule>'
- '<AllowedMethod>PUT</AllowedMethod>'
- '<AllowedMethod>POST</AllowedMethod>'
- '<AllowedMethod>DELETE</AllowedMethod>'
- '<AllowedOrigin>http://www.example.com</AllowedOrigin>'
- '<AllowedHeader>*</AllowedHeader>'
- '<ExposeHeader>x-amz-server-side-encryption</ExposeHeader>'
- '<MaxAgeSeconds>3000</MaxAgeSeconds>'
- '</CORSRule>'
- '<CORSRule>'
- '<AllowedMethod>GET</AllowedMethod>'
- '<AllowedOrigin>*</AllowedOrigin>'
- '<AllowedHeader>*</AllowedHeader>'
- '<MaxAgeSeconds>3000</MaxAgeSeconds>'
- '</CORSRule>'
- '</CORSConfiguration>')
-
-CORS_BODY_3 = (
- '<CORSConfiguration>'
- '<CORSRule>'
- '<AllowedMethod>GET</AllowedMethod>'
- '<AllowedOrigin>*</AllowedOrigin>'
- '</CORSRule>'
- '</CORSConfiguration>')
-
-
-class TestCORSConfiguration(unittest.TestCase):
-
- def test_one_rule_with_id(self):
- cfg = CORSConfiguration()
- cfg.add_rule(['PUT', 'POST', 'DELETE'],
- 'http://www.example.com',
- allowed_header='*',
- max_age_seconds=3000,
- expose_header='x-amz-server-side-encryption',
- id='foobar_rule')
- self.assertEqual(cfg.to_xml(), CORS_BODY_1)
-
- def test_two_rules(self):
- cfg = CORSConfiguration()
- cfg.add_rule(['PUT', 'POST', 'DELETE'],
- 'http://www.example.com',
- allowed_header='*',
- max_age_seconds=3000,
- expose_header='x-amz-server-side-encryption')
- cfg.add_rule('GET', '*', allowed_header='*', max_age_seconds=3000)
- self.assertEqual(cfg.to_xml(), CORS_BODY_2)
-
- def test_minimal(self):
- cfg = CORSConfiguration()
- cfg.add_rule('GET', '*')
- self.assertEqual(cfg.to_xml(), CORS_BODY_3)
-
-
-if __name__ == "__main__":
- unittest.main()

Powered by Google App Engine
This is Rietveld 408576698