~juju-qa/ubuntu/yakkety/juju/2.0-rc3-again

« back to all changes in this revision

Viewing changes to src/launchpad.net/goamz/exp/mturk/sign_test.go

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2013-04-24 22:34:47 UTC
  • Revision ID: package-import@ubuntu.com-20130424223447-f0qdji7ubnyo0s71
Tags: upstream-1.10.0.1
ImportĀ upstreamĀ versionĀ 1.10.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package mturk_test
 
2
 
 
3
import (
 
4
        "launchpad.net/goamz/aws"
 
5
        "launchpad.net/goamz/exp/mturk"
 
6
        . "launchpad.net/gocheck"
 
7
)
 
8
 
 
9
// Mechanical Turk REST authentication docs: http://goo.gl/wrzfn
 
10
 
 
11
var testAuth = aws.Auth{"user", "secret"}
 
12
 
 
13
// == fIJy9wCApBNL2R4J2WjJGtIBFX4=
 
14
func (s *S) TestBasicSignature(c *C) {
 
15
        params := map[string]string{}
 
16
        mturk.Sign(testAuth, "AWSMechanicalTurkRequester", "CreateHIT", "2012-02-16T20:30:47Z", params)
 
17
        expected := "b/TnvzrdeD/L/EyzdFrznPXhido="
 
18
        c.Assert(params["Signature"], Equals, expected)
 
19
}