~jk0/nova/xs-ipv6

« back to all changes in this revision

Viewing changes to vendor/boto/boto/mturk/test/create_hit_external.py

  • Committer: Jesse Andrews
  • Date: 2010-05-28 06:05:26 UTC
  • Revision ID: git-v1:bf6e6e718cdc7488e2da87b21e258ccc065fe499
initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import uuid
 
2
import datetime
 
3
from boto.mturk.connection import MTurkConnection
 
4
from boto.mturk.question import ExternalQuestion
 
5
 
 
6
def test():
 
7
    q = ExternalQuestion(external_url="http://websort.net/s/F3481C", frame_height=800)
 
8
    conn = MTurkConnection(host='mechanicalturk.sandbox.amazonaws.com')
 
9
    keywords=['boto', 'test', 'doctest']
 
10
    create_hit_rs = conn.create_hit(question=q, lifetime=60*65,max_assignments=2,title="Boto External Question Test", keywords=keywords,reward = 0.05, duration=60*6,approval_delay=60*60, annotation='An annotation from boto external question test', response_groups=['Minimal','HITDetail','HITQuestion','HITAssignmentSummary',])
 
11
    assert(create_hit_rs.status == True)
 
12
 
 
13
if __name__ == "__main__":
 
14
    test()