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

Unified Diff: third_party/gsutil/boto/tests/mturk/mocks.py

Issue 12317103: Added gsutil to depot tools (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: added readme Created 7 years, 10 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: third_party/gsutil/boto/tests/mturk/mocks.py
diff --git a/third_party/gsutil/boto/tests/mturk/mocks.py b/third_party/gsutil/boto/tests/mturk/mocks.py
new file mode 100644
index 0000000000000000000000000000000000000000..0b2c52c43ce0d0eff81bf0979977d024b439bfdb
--- /dev/null
+++ b/third_party/gsutil/boto/tests/mturk/mocks.py
@@ -0,0 +1,11 @@
+from boto.mturk.connection import MTurkConnection as RealMTurkConnection
+
+class MTurkConnection(RealMTurkConnection):
+ """
+ Mock MTurkConnection that doesn't connect, but instead just prepares
+ the request and captures information about its usage.
+ """
+
+ def _process_request(self, *args, **kwargs):
+ saved_args = self.__dict__.setdefault('_mock_saved_args', dict())
+ saved_args['_process_request'] = (args, kwargs)

Powered by Google App Engine
This is Rietveld 408576698