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

Unified Diff: chrome/test/functional/ispy/ispy_core/Tests/BucketManagerTests/DependancyInjection/boto_injector.py

Issue 16855010: Python Tools for Pixel-by-Pixel Image Comparison (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set up folder structure, added bucket manager and tests. Created 7 years, 6 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: chrome/test/functional/ispy/ispy_core/Tests/BucketManagerTests/DependancyInjection/boto_injector.py
diff --git a/chrome/test/functional/ispy/ispy_core/Tests/BucketManagerTests/DependancyInjection/boto_injector.py b/chrome/test/functional/ispy/ispy_core/Tests/BucketManagerTests/DependancyInjection/boto_injector.py
new file mode 100644
index 0000000000000000000000000000000000000000..44ab3e25b1c727048f41dfb347734c57f3936bce
--- /dev/null
+++ b/chrome/test/functional/ispy/ispy_core/Tests/BucketManagerTests/DependancyInjection/boto_injector.py
@@ -0,0 +1,54 @@
+"""Set of classes and methods to perform dependency injection on boto."""
+
+
+class BotoInjector(object):
+ """The BotoInjector abstract class."""
+
+ def storage_uri(self, uri_str, default_scheme):
+ """Method to get the storage_uri."""
+ raise NotImplementedError
+
+ def connect(self, uri, key, secret):
+ """Method to get a connection."""
+ raise NotImplementedError
+
+ def get_bucket(self, connection, bucket_name):
+ """Method to get a bucket."""
+ raise NotImplementedError
+
+ def get_key(self, bucket):
+ """Method to get a key."""
+ raise NotImplementedError
+
+ def get_all_keys(self, bucket, prefix):
+ """Method to get all keys starting with a prefix in a bucket."""
+ raise NotImplementedError
+
+
+class Key(object):
+ """Abstract Key class."""
+
+ def exists(self):
+ """Method to return whether the key exists in the datastore."""
+ raise NotImplementedError
+
+ def set_metadata(self, name, value):
+ """Method to set metadata for the key."""
+ raise NotImplementedError
+
+ def set_path(self, path):
+ """Method to set the path of the key."""
+ raise NotImplementedError
+
+ def set_contents_from_string(self, contents):
+ """Method to set the contents of the key's file."""
+ raise NotImplementedError
+
+ def get_contents_as_string(self):
+ """Method to get the contents of the key's file."""
+ raise NotImplementedError
+
+ def generate_url(self, timeout):
+ """Method to generate a url to the key's file."""
+ raise NotImplementedError
+

Powered by Google App Engine
This is Rietveld 408576698