~maxiberta/canonical-identity-provider/vanilla-sshkeys-debug

« back to all changes in this revision

Viewing changes to src/api/v20/tests/test_handlers.py

  • Committer: Ubuntu One Auto Copilot
  • Author(s): Guillermo Gonzalez
  • Date: 2019-05-22 20:57:16 UTC
  • mfrom: (1668.3.12 xenial)
  • Revision ID: otto-copilot@canonical.com-20190522205716-143iaozv4drdmxmj
make it work in xenial

Merged from https://code.launchpad.net/~verterok/canonical-identity-provider/xenial-port/+merge/366731

Show diffs side-by-side

added added

removed removed

Lines of Context:
1576
1576
            ('name', 'algo más'.encode('utf-8')),
1577
1577
        ]
1578
1578
        # URL params have to be urlencoded
1579
 
        url = 'http://sso-trusty:8000/error?' + urlencode(params)
 
1579
        url = 'http://sso-test:8000/error?' + urlencode(params)
1580
1580
 
1581
1581
        account = self.factory.make_account(
1582
1582
            openid_identifier='1234567', oauth_secret='1234567890')
1585
1585
            secret='0987654321', name='foo')
1586
1586
        assert account.secret == '1234567890', account.secret
1587
1587
 
1588
 
        # use fix signature from http://nouncer.com/oauth/authentication.html
 
1588
        # use fix signature from http://lti.tools/oauth/
1589
1589
        # timestamp 1442966400
1590
1590
        # nonce 12345
1591
1591
        header = (
1592
 
            'OAuth realm="http://sso-trusty:8000/error",'
 
1592
            'OAuth realm="http://sso-test:8000/error",'
1593
1593
            'oauth_consumer_key="1234567",'
1594
1594
            'oauth_token="12345678901234567890123456789012345678901234567890",'
1595
1595
            'oauth_nonce="12345",'
1596
1596
            'oauth_timestamp="1442966400",'
1597
1597
            'oauth_signature_method="HMAC-SHA1",'
1598
1598
            'oauth_version="1.0",'
1599
 
            'oauth_signature="cOCcOe6F5qLDl43G1uvn1tx9Eig%3D"'
 
1599
            'oauth_signature="NI71nsd1JoYFqJTAO3YGb%2BeUoL8%3D"'
1600
1600
        )
1601
1601
        data = {
1602
1602
            'http_url': url, 'http_method': 'GET',
1619
1619
            secret='0987654321', name='foo')
1620
1620
        assert account.secret == '1234567890', account.secret
1621
1621
 
1622
 
        # use fix signature from http://nouncer.com/oauth/authentication.html
 
1622
        # use fix signature from http://lti.tools/oauth/
1623
1623
        # timestamp 1444338517
1624
1624
        # nonce 12345
1625
1625
        url = 'http://example.com/?currency=USD&'