~ubuntuone-pqm-team/canonical-identity-provider/trunk

« back to all changes in this revision

Viewing changes to src/mockservice/api-authentications.txt

  • Committer: Colin Watson
  • Date: 2018-01-26 00:47:02 UTC
  • mto: This revision was merged to the branch mainline in revision 1593.
  • Revision ID: cjwatson@canonical.com-20180126004702-0difdwm66ucwuikk
Use Python 3-style print functions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
    ...     try:
44
44
    ...         exec method_name
45
45
    ...     except HTTPError as e:
46
 
    ...         print "%s %s" % (method_name, e.response.status)
 
46
    ...         print("%s %s" % (method_name, e.response.status))
47
47
    api.authentications.authenticate 401
48
48
    api.authentications.invalidate_token 401
49
49
    api.authentications.validate_token 401
73
73
    ...            'api.accounts.validate_email']
74
74
    >>> for method_name in methods:
75
75
    ...     try:
76
 
    ...         exec 'print ' + method_name
 
76
    ...         exec 'print(%s)' % method_name
77
77
    ...     except HTTPError as e:
78
 
    ...         print "%s %s" % (method_name, e.response.status)
 
78
    ...         print("%s %s" % (method_name, e.response.status))
79
79
    api.authentications.list_tokens 401
80
80
    api.accounts.me 401
81
81
    api.accounts.validate_email 401
113
113
    ...     try:
114
114
    ...         exec method_name
115
115
    ...     except HTTPError as e:
116
 
    ...         print "%s %s" % (method_name, e.response.status)
 
116
    ...         print("%s %s" % (method_name, e.response.status))
117
117
    api.authentications.authenticate 401
118
118
    api.authentications.invalidate_token 401
119
119
 
142
142
    ...     try:
143
143
    ...         exec method_name
144
144
    ...     except HTTPError as e:
145
 
    ...         print "%s %s" % (method_name, e.response.status)
 
145
    ...         print("%s %s" % (method_name, e.response.status))
146
146
    api.auathntications.authenticate 401
147
147
    api.accounts.me 401
148
148
    api.accounts.validate_email 401