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

Unified Diff: tools/telemetry/third_party/gsutilz/third_party/boto/tests/mturk/common.py

Issue 1376593003: Roll gsutil version to 4.15. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/gsutilz/third_party/boto/tests/mturk/common.py
diff --git a/tools/telemetry/third_party/gsutilz/third_party/boto/tests/mturk/common.py b/tools/telemetry/third_party/gsutilz/third_party/boto/tests/mturk/common.py
index 7fb705edd9d958486f6d43e90fdecadbced0ad3b..151714ae9a5533fd273f0a364f3fc47075f5e39f 100644
--- a/tools/telemetry/third_party/gsutilz/third_party/boto/tests/mturk/common.py
+++ b/tools/telemetry/third_party/gsutilz/third_party/boto/tests/mturk/common.py
@@ -1,45 +1,45 @@
-import unittest
-import uuid
-import datetime
-
-from boto.mturk.question import (
- Question, QuestionContent, AnswerSpecification, FreeTextAnswer,
-)
-from _init_environment import SetHostMTurkConnection, config_environment
-
-class MTurkCommon(unittest.TestCase):
- def setUp(self):
- config_environment()
- self.conn = SetHostMTurkConnection()
-
- @staticmethod
- def get_question():
- # create content for a question
- qn_content = QuestionContent()
- qn_content.append_field('Title', 'Boto no hit type question content')
- qn_content.append_field('Text', 'What is a boto no hit type?')
-
- # create the question specification
- qn = Question(identifier=str(uuid.uuid4()),
- content=qn_content,
- answer_spec=AnswerSpecification(FreeTextAnswer()))
- return qn
-
- @staticmethod
- def get_hit_params():
- return dict(
- lifetime=datetime.timedelta(minutes=65),
- max_assignments=2,
- title='Boto create_hit title',
- description='Boto create_hit description',
- keywords=['boto', 'test'],
- reward=0.23,
- duration=datetime.timedelta(minutes=6),
- approval_delay=60*60,
- annotation='An annotation from boto create_hit test',
- response_groups=['Minimal',
- 'HITDetail',
- 'HITQuestion',
- 'HITAssignmentSummary',],
- )
-
+import unittest
+import uuid
+import datetime
+
+from boto.mturk.question import (
+ Question, QuestionContent, AnswerSpecification, FreeTextAnswer,
+)
+from _init_environment import SetHostMTurkConnection, config_environment
+
+class MTurkCommon(unittest.TestCase):
+ def setUp(self):
+ config_environment()
+ self.conn = SetHostMTurkConnection()
+
+ @staticmethod
+ def get_question():
+ # create content for a question
+ qn_content = QuestionContent()
+ qn_content.append_field('Title', 'Boto no hit type question content')
+ qn_content.append_field('Text', 'What is a boto no hit type?')
+
+ # create the question specification
+ qn = Question(identifier=str(uuid.uuid4()),
+ content=qn_content,
+ answer_spec=AnswerSpecification(FreeTextAnswer()))
+ return qn
+
+ @staticmethod
+ def get_hit_params():
+ return dict(
+ lifetime=datetime.timedelta(minutes=65),
+ max_assignments=2,
+ title='Boto create_hit title',
+ description='Boto create_hit description',
+ keywords=['boto', 'test'],
+ reward=0.23,
+ duration=datetime.timedelta(minutes=6),
+ approval_delay=60*60,
+ annotation='An annotation from boto create_hit test',
+ response_groups=['Minimal',
+ 'HITDetail',
+ 'HITQuestion',
+ 'HITAssignmentSummary',],
+ )
+

Powered by Google App Engine
This is Rietveld 408576698