Merge lp:~canonical-isd-hackers/canonical-identity-provider/test_suite_fixes into lp:canonical-identity-provider/release
- test_suite_fixes
- Merge into trunk
Proposed by
David Owen
Status: | Merged |
---|---|
Approved by: | Ricardo Kirkner |
Approved revision: | no longer in the source branch. |
Merged at revision: | 122 |
Proposed branch: | lp:~canonical-isd-hackers/canonical-identity-provider/test_suite_fixes |
Merge into: | lp:canonical-identity-provider/release |
Diff against target: |
1204 lines (+274/-226) 6 files modified
doctests/stories/api-workflows.txt (+5/-3) identityprovider/tests/test_admin.py (+21/-8) mockservice/sso_mockserver/mockserver.py (+6/-0) mockservice/sso_mockserver/wadl.xml (+238/-212) scripts/create_env (+2/-2) scripts/test (+2/-1) |
To merge this branch: | bzr merge lp:~canonical-isd-hackers/canonical-identity-provider/test_suite_fixes |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ricardo Kirkner (community) | Approve | ||
Review via email: mp+44336@code.launchpad.net |
Commit message
Adds some recent features to the mock API server, and improves the suite's determinism.
Description of the change
Added a missing part of the mocked API.
Made the test runner wait properly for WSGI shutdown (avoids some port 80 already in use errors).
Don't rely on getting certain IDs for new objects. We now have Django do transaction-
To post a comment you must log in.
Revision history for this message
Łukasz Czyżykowski (lukasz-czyzykowski) wrote : | # |
There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'doctests/stories/api-workflows.txt' |
2 | --- doctests/stories/api-workflows.txt 2010-12-14 16:52:42 +0000 |
3 | +++ doctests/stories/api-workflows.txt 2011-01-03 20:45:27 +0000 |
4 | @@ -308,7 +308,8 @@ |
5 | Retrive Account Information By Email Address Associated To It |
6 | ------------------------------------------------------------- |
7 | |
8 | - >>> api.authentications.account_by_email(email="blu@bli.com") |
9 | + >>> account = api.authentications.account_by_email(email="blu@bli.com") |
10 | + >>> account |
11 | {u'username': ..., u'preferred_email': u'blu@bli.com', u'displayname': ..., u'unverified_emails': [], u'verified_emails': [], u'openid_identifier': ...} |
12 | |
13 | >>> r = api.authentications.account_by_email(email="bad-email@example.com") |
14 | @@ -318,8 +319,9 @@ |
15 | Retrive Account Information By OpenID Identifier Associated To It |
16 | ------------------------------------------------------------- |
17 | |
18 | - >>> api.authentications.account_by_openid(openid="openid_identifier") |
19 | - {u'username': ..., u'preferred_email': u'blu@bli.com', u'displayname': ..., u'unverified_emails': [], u'verified_emails': [], u'openid_identifier': u'openid_identifier)} |
20 | + >>> api.authentications.account_by_openid( |
21 | + ... openid=account['openid_identifier']) |
22 | + {u'username': ..., u'preferred_email': u'blu@bli.com', u'displayname': ..., u'unverified_emails': [], u'verified_emails': [], u'openid_identifier': ...} |
23 | |
24 | >>> r = api.authentications.account_by_openid(openid="bad-openid") |
25 | >>> r is None |
26 | |
27 | === modified file 'identityprovider/tests/test_admin.py' |
28 | --- identityprovider/tests/test_admin.py 2010-12-13 13:48:18 +0000 |
29 | +++ identityprovider/tests/test_admin.py 2011-01-03 20:45:27 +0000 |
30 | @@ -34,18 +34,31 @@ |
31 | for model in (AccountPassword, Person, LPOpenIdIdentifier): |
32 | self.assertRaises(NotRegistered, admin.site.unregister, model) |
33 | |
34 | - def test_openidrpconfig_allowed_sreg_checkboxes(self): |
35 | + def test_openidrpconfig_allowed_sreg_checkboxes_postable(self): |
36 | + data = {'trust_root': 'http://localhost/bla/', |
37 | + 'displayname': 'My Test RP', |
38 | + 'description': 'Bla', |
39 | + 'allowed_sreg': 'fullname', |
40 | + 'creation_rationale': '13', |
41 | + } |
42 | response = self.client.get('/admin/identityprovider/openidrpconfig/add/') |
43 | - data = {'trust_root': 'http://localhost/bla/', |
44 | - 'displayname': 'My Test RP', |
45 | - 'description': 'Bla', |
46 | - 'allowed_sreg': 'fullname', |
47 | - 'creation_rationale': '13', |
48 | - } |
49 | response = self.client.post('/admin/identityprovider/openidrpconfig/add/', |
50 | data) |
51 | self.assertEquals(302, response.status_code) |
52 | - response = self.client.get('/admin/identityprovider/openidrpconfig/1/') |
53 | + # We don't get the ID back, so continue on to the next test to |
54 | + # verify that the checkbox appears on the model's screen. |
55 | + |
56 | + def test_openidrpconfig_allowed_sreg_checkboxes_getable(self): |
57 | + data = {'trust_root': 'http://localhost/bla/', |
58 | + 'displayname': 'My Test RP', |
59 | + 'description': 'Bla', |
60 | + 'allowed_sreg': 'fullname', |
61 | + 'creation_rationale': '13', |
62 | + } |
63 | + rpconfig = OpenIDRPConfig(**data) |
64 | + rpconfig.save() |
65 | + response = self.client.get('/admin/identityprovider/openidrpconfig/%s/' |
66 | + % rpconfig.id) |
67 | self.assertContains(response, 'checked') |
68 | |
69 | def test_inline_models(self): |
70 | |
71 | === modified file 'mockservice/sso_mockserver/mockserver.py' |
72 | --- mockservice/sso_mockserver/mockserver.py 2010-09-14 23:37:14 +0000 |
73 | +++ mockservice/sso_mockserver/mockserver.py 2011-01-03 20:45:27 +0000 |
74 | @@ -261,6 +261,12 @@ |
75 | return self.jsons('verified_accounts') |
76 | else: |
77 | return self.jsons(json='null') |
78 | + elif op == 'account_by_openid': |
79 | + openid = form['openid'] |
80 | + if openid == 'openid_identifier': |
81 | + return self.jsons('verified_accounts') |
82 | + else: |
83 | + return self.jsons(json='null') |
84 | |
85 | elif self.environ['REQUEST_METHOD'].lower() == 'post': |
86 | clength = int(self.environ['CONTENT_LENGTH']) |
87 | |
88 | === modified file 'mockservice/sso_mockserver/wadl.xml' |
89 | --- mockservice/sso_mockserver/wadl.xml 2010-08-11 18:14:58 +0000 |
90 | +++ mockservice/sso_mockserver/wadl.xml 2011-01-03 20:45:27 +0000 |
91 | @@ -31,41 +31,41 @@ |
92 | <!--The JSON representation of a "service root" resource contains a |
93 | number of links to collection-type resources.--> |
94 | <wadl:representation mediaType="application/json" id="service-root-json"> |
95 | - |
96 | + |
97 | <wadl:param style="plain" |
98 | path="$['registrations_collection_link']" |
99 | name="registrations_collection_link"> |
100 | <wadl:link resource_type="@@SERVICE_ROOT@@/#registrations"/> |
101 | </wadl:param> |
102 | - |
103 | - |
104 | + |
105 | + |
106 | <wadl:param style="plain" |
107 | path="$['authentications_collection_link']" |
108 | name="authentications_collection_link"> |
109 | <wadl:link resource_type="@@SERVICE_ROOT@@/#authentications"/> |
110 | </wadl:param> |
111 | - |
112 | - |
113 | + |
114 | + |
115 | <wadl:param style="plain" |
116 | path="$['captchas_collection_link']" |
117 | name="captchas_collection_link"> |
118 | <wadl:link resource_type="@@SERVICE_ROOT@@/#captchas"/> |
119 | </wadl:param> |
120 | - |
121 | - |
122 | + |
123 | + |
124 | <wadl:param style="plain" |
125 | path="$['accounts_collection_link']" |
126 | name="accounts_collection_link"> |
127 | <wadl:link resource_type="@@SERVICE_ROOT@@/#accounts"/> |
128 | </wadl:param> |
129 | - |
130 | - |
131 | + |
132 | + |
133 | <wadl:param style="plain" |
134 | path="$['validations_collection_link']" |
135 | name="validations_collection_link"> |
136 | <wadl:link resource_type="@@SERVICE_ROOT@@/#accounts"/> |
137 | </wadl:param> |
138 | - |
139 | + |
140 | <wadl:param style="plain" name="resource_type_link" path="$['resource_type_link']"> |
141 | <wadl:doc>The link to the WADL description of this resource.</wadl:doc> |
142 | <wadl:link/> |
143 | @@ -77,9 +77,9 @@ |
144 | service.--> |
145 | |
146 | <!--Begin resource_type definitions for collection resources.--> |
147 | - |
148 | + |
149 | <wadl:resource_type id="accounts"> |
150 | - |
151 | + |
152 | <wadl:method name="GET" id="accounts-get"> |
153 | <wadl:response> |
154 | <wadl:representation |
155 | @@ -95,21 +95,21 @@ |
156 | Get details for the currently authenticated user. |
157 | </wadl:doc> |
158 | <wadl:request> |
159 | - |
160 | + |
161 | <wadl:param style="query" name="ws.op" |
162 | required="true" fixed="me"> |
163 | <wadl:doc>The name of the operation being invoked.</wadl:doc> |
164 | </wadl:param> |
165 | - |
166 | + |
167 | </wadl:request> |
168 | - |
169 | + |
170 | </wadl:method> |
171 | <wadl:method id="accounts-team_memberships" name="GET"> |
172 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
173 | Query account for team memberships |
174 | </wadl:doc> |
175 | <wadl:request> |
176 | - |
177 | + |
178 | <wadl:param style="query" name="ws.op" |
179 | required="true" |
180 | fixed="team_memberships"> |
181 | @@ -120,18 +120,18 @@ |
182 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
183 | List of team names to check |
184 | </wadl:doc> |
185 | - |
186 | + |
187 | </wadl:param> |
188 | - |
189 | + |
190 | </wadl:request> |
191 | - |
192 | + |
193 | </wadl:method> |
194 | <wadl:method id="accounts-validate_email" name="GET"> |
195 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
196 | Validate email by sending token user received in email |
197 | </wadl:doc> |
198 | <wadl:request> |
199 | - |
200 | + |
201 | <wadl:param style="query" name="ws.op" |
202 | required="true" |
203 | fixed="validate_email"> |
204 | @@ -142,18 +142,18 @@ |
205 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
206 | Email validation token. |
207 | </wadl:doc> |
208 | - |
209 | + |
210 | </wadl:param> |
211 | - |
212 | + |
213 | </wadl:request> |
214 | - |
215 | + |
216 | </wadl:method> |
217 | </wadl:resource_type> |
218 | |
219 | - |
220 | - |
221 | + |
222 | + |
223 | <wadl:resource_type id="authentications"> |
224 | - |
225 | + |
226 | <wadl:method name="GET" id="authentications-get"> |
227 | <wadl:response> |
228 | <wadl:representation |
229 | @@ -169,14 +169,14 @@ |
230 | Get details for the currently authenticated user. |
231 | </wadl:doc> |
232 | <wadl:request> |
233 | - |
234 | + |
235 | <wadl:param style="query" name="ws.op" |
236 | required="true" fixed="me"> |
237 | <wadl:doc>The name of the operation being invoked.</wadl:doc> |
238 | </wadl:param> |
239 | - |
240 | + |
241 | </wadl:request> |
242 | - |
243 | + |
244 | </wadl:method> |
245 | <wadl:method id="authentications-authenticate" |
246 | name="GET"> |
247 | @@ -184,7 +184,7 @@ |
248 | Obtain OAuth token for logged in user |
249 | </wadl:doc> |
250 | <wadl:request> |
251 | - |
252 | + |
253 | <wadl:param style="query" name="ws.op" |
254 | required="true" fixed="authenticate"> |
255 | <wadl:doc>The name of the operation being invoked.</wadl:doc> |
256 | @@ -194,11 +194,11 @@ |
257 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
258 | Token name. |
259 | </wadl:doc> |
260 | - |
261 | + |
262 | </wadl:param> |
263 | - |
264 | + |
265 | </wadl:request> |
266 | - |
267 | + |
268 | </wadl:method> |
269 | <wadl:method id="authentications-team_memberships" |
270 | name="GET"> |
271 | @@ -206,7 +206,7 @@ |
272 | Query user for team memberships |
273 | </wadl:doc> |
274 | <wadl:request> |
275 | - |
276 | + |
277 | <wadl:param style="query" name="ws.op" |
278 | required="true" |
279 | fixed="team_memberships"> |
280 | @@ -217,18 +217,18 @@ |
281 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
282 | List of team names to check |
283 | </wadl:doc> |
284 | - |
285 | + |
286 | </wadl:param> |
287 | <wadl:param style="query" required="true" |
288 | name="openid_identifier"> |
289 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
290 | OpenID Identifier used for asking forteam memberships on behalf of other user. |
291 | </wadl:doc> |
292 | - |
293 | + |
294 | </wadl:param> |
295 | - |
296 | + |
297 | </wadl:request> |
298 | - |
299 | + |
300 | </wadl:method> |
301 | <wadl:method id="authentications-validate_token" |
302 | name="GET"> |
303 | @@ -238,7 +238,7 @@ |
304 | |
305 | </wadl:doc> |
306 | <wadl:request> |
307 | - |
308 | + |
309 | <wadl:param style="query" name="ws.op" |
310 | required="true" |
311 | fixed="validate_token"> |
312 | @@ -249,18 +249,41 @@ |
313 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
314 | The token you want to validate |
315 | </wadl:doc> |
316 | - |
317 | + |
318 | </wadl:param> |
319 | <wadl:param style="query" required="true" |
320 | name="consumer_key"> |
321 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
322 | The consumer key (openid identifier) |
323 | </wadl:doc> |
324 | - |
325 | - </wadl:param> |
326 | - |
327 | - </wadl:request> |
328 | - |
329 | + |
330 | + </wadl:param> |
331 | + |
332 | + </wadl:request> |
333 | + |
334 | + </wadl:method> |
335 | + <wadl:method id="authentications-account_by_openid" |
336 | + name="GET"> |
337 | + <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
338 | +Retrieve account information based on OpenID identifier |
339 | +</wadl:doc> |
340 | + <wadl:request> |
341 | + |
342 | + <wadl:param style="query" name="ws.op" |
343 | + required="true" |
344 | + fixed="account_by_openid"> |
345 | + <wadl:doc>The name of the operation being invoked.</wadl:doc> |
346 | + </wadl:param> |
347 | + <wadl:param style="query" required="true" |
348 | + name="openid"> |
349 | + <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
350 | +OpenID Identifier of the account |
351 | +</wadl:doc> |
352 | + |
353 | + </wadl:param> |
354 | + |
355 | + </wadl:request> |
356 | + |
357 | </wadl:method> |
358 | <wadl:method id="authentications-validate_email" |
359 | name="GET"> |
360 | @@ -268,7 +291,7 @@ |
361 | Validate email by sending token user received in email |
362 | </wadl:doc> |
363 | <wadl:request> |
364 | - |
365 | + |
366 | <wadl:param style="query" name="ws.op" |
367 | required="true" |
368 | fixed="validate_email"> |
369 | @@ -279,11 +302,11 @@ |
370 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
371 | Email validation token. |
372 | </wadl:doc> |
373 | - |
374 | + |
375 | </wadl:param> |
376 | - |
377 | + |
378 | </wadl:request> |
379 | - |
380 | + |
381 | </wadl:method> |
382 | <wadl:method id="authentications-account_by_email" |
383 | name="GET"> |
384 | @@ -291,7 +314,7 @@ |
385 | Retrieve account information based on email address |
386 | </wadl:doc> |
387 | <wadl:request> |
388 | - |
389 | + |
390 | <wadl:param style="query" name="ws.op" |
391 | required="true" |
392 | fixed="account_by_email"> |
393 | @@ -300,13 +323,13 @@ |
394 | <wadl:param style="query" required="true" |
395 | name="email"> |
396 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
397 | -Email address of the account. |
398 | +Email address of the account |
399 | </wadl:doc> |
400 | - |
401 | + |
402 | </wadl:param> |
403 | - |
404 | + |
405 | </wadl:request> |
406 | - |
407 | + |
408 | </wadl:method> |
409 | <wadl:method id="authentications-list_tokens" |
410 | name="GET"> |
411 | @@ -314,7 +337,7 @@ |
412 | Get the currently valid tokens for a given user |
413 | </wadl:doc> |
414 | <wadl:request> |
415 | - |
416 | + |
417 | <wadl:param style="query" name="ws.op" |
418 | required="true" fixed="list_tokens"> |
419 | <wadl:doc>The name of the operation being invoked.</wadl:doc> |
420 | @@ -324,11 +347,11 @@ |
421 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
422 | User's OpenID identifier |
423 | </wadl:doc> |
424 | - |
425 | + |
426 | </wadl:param> |
427 | - |
428 | + |
429 | </wadl:request> |
430 | - |
431 | + |
432 | </wadl:method> |
433 | <wadl:method id="authentications-invalidate_token" |
434 | name="POST"> |
435 | @@ -348,25 +371,25 @@ |
436 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
437 | The token you want to invalidate |
438 | </wadl:doc> |
439 | - |
440 | + |
441 | </wadl:param> |
442 | <wadl:param style="query" required="true" |
443 | name="consumer_key"> |
444 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
445 | The consumer key (openid identifier) |
446 | </wadl:doc> |
447 | - |
448 | + |
449 | </wadl:param> |
450 | </wadl:representation> |
451 | </wadl:request> |
452 | - |
453 | + |
454 | </wadl:method> |
455 | </wadl:resource_type> |
456 | |
457 | - |
458 | - |
459 | + |
460 | + |
461 | <wadl:resource_type id="captchas"> |
462 | - |
463 | + |
464 | <wadl:method name="GET" id="captchas-get"> |
465 | <wadl:response> |
466 | <wadl:representation |
467 | @@ -390,14 +413,14 @@ |
468 | </wadl:param> |
469 | </wadl:representation> |
470 | </wadl:request> |
471 | - |
472 | + |
473 | </wadl:method> |
474 | </wadl:resource_type> |
475 | |
476 | - |
477 | - |
478 | + |
479 | + |
480 | <wadl:resource_type id="registrations"> |
481 | - |
482 | + |
483 | <wadl:method name="GET" id="registrations-get"> |
484 | <wadl:response> |
485 | <wadl:representation |
486 | @@ -413,14 +436,14 @@ |
487 | Get details for the currently authenticated user. |
488 | </wadl:doc> |
489 | <wadl:request> |
490 | - |
491 | + |
492 | <wadl:param style="query" name="ws.op" |
493 | required="true" fixed="me"> |
494 | <wadl:doc>The name of the operation being invoked.</wadl:doc> |
495 | </wadl:param> |
496 | - |
497 | + |
498 | </wadl:request> |
499 | - |
500 | + |
501 | </wadl:method> |
502 | <wadl:method id="registrations-team_memberships" |
503 | name="GET"> |
504 | @@ -428,7 +451,7 @@ |
505 | Query account for team memberships |
506 | </wadl:doc> |
507 | <wadl:request> |
508 | - |
509 | + |
510 | <wadl:param style="query" name="ws.op" |
511 | required="true" |
512 | fixed="team_memberships"> |
513 | @@ -439,11 +462,11 @@ |
514 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
515 | List of team names to check |
516 | </wadl:doc> |
517 | - |
518 | + |
519 | </wadl:param> |
520 | - |
521 | + |
522 | </wadl:request> |
523 | - |
524 | + |
525 | </wadl:method> |
526 | <wadl:method id="registrations-validate_email" |
527 | name="GET"> |
528 | @@ -451,7 +474,7 @@ |
529 | Validate email by sending token user received in email |
530 | </wadl:doc> |
531 | <wadl:request> |
532 | - |
533 | + |
534 | <wadl:param style="query" name="ws.op" |
535 | required="true" |
536 | fixed="validate_email"> |
537 | @@ -462,11 +485,73 @@ |
538 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
539 | Email validation token. |
540 | </wadl:doc> |
541 | - |
542 | - </wadl:param> |
543 | - |
544 | - </wadl:request> |
545 | - |
546 | + |
547 | + </wadl:param> |
548 | + |
549 | + </wadl:request> |
550 | + |
551 | + </wadl:method> |
552 | + <wadl:method id="registrations-request_password_reset_token" |
553 | + name="POST"> |
554 | + <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
555 | +Request password reset code to be sent to the email |
556 | +</wadl:doc> |
557 | + <wadl:request> |
558 | + <wadl:representation |
559 | + mediaType="application/x-www-form-urlencoded"> |
560 | + <wadl:param style="query" name="ws.op" |
561 | + required="true" |
562 | + fixed="request_password_reset_token"> |
563 | + <wadl:doc>The name of the operation being invoked.</wadl:doc> |
564 | + </wadl:param> |
565 | + <wadl:param style="query" required="true" |
566 | + name="email"> |
567 | + <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
568 | +Email address. |
569 | +</wadl:doc> |
570 | + |
571 | + </wadl:param> |
572 | + </wadl:representation> |
573 | + </wadl:request> |
574 | + |
575 | + </wadl:method> |
576 | + <wadl:method id="registrations-set_new_password" |
577 | + name="POST"> |
578 | + <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
579 | +Set new password for given user |
580 | +</wadl:doc> |
581 | + <wadl:request> |
582 | + <wadl:representation |
583 | + mediaType="application/x-www-form-urlencoded"> |
584 | + <wadl:param style="query" name="ws.op" |
585 | + required="true" |
586 | + fixed="set_new_password"> |
587 | + <wadl:doc>The name of the operation being invoked.</wadl:doc> |
588 | + </wadl:param> |
589 | + <wadl:param style="query" required="true" |
590 | + name="new_password"> |
591 | + <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
592 | +New password |
593 | +</wadl:doc> |
594 | + |
595 | + </wadl:param> |
596 | + <wadl:param style="query" required="true" |
597 | + name="token"> |
598 | + <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
599 | +Password reset token. |
600 | +</wadl:doc> |
601 | + |
602 | + </wadl:param> |
603 | + <wadl:param style="query" required="true" |
604 | + name="email"> |
605 | + <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
606 | +Email address. |
607 | +</wadl:doc> |
608 | + |
609 | + </wadl:param> |
610 | + </wadl:representation> |
611 | + </wadl:request> |
612 | + |
613 | </wadl:method> |
614 | <wadl:method id="registrations-register" name="POST"> |
615 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
616 | @@ -484,102 +569,43 @@ |
617 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
618 | Solution for the generated captcha. |
619 | </wadl:doc> |
620 | - |
621 | + |
622 | </wadl:param> |
623 | <wadl:param style="query" required="true" |
624 | name="password"> |
625 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
626 | Password should be at least 8 characters long and contain at least one uppercase letter and a number. |
627 | </wadl:doc> |
628 | - |
629 | + |
630 | </wadl:param> |
631 | <wadl:param style="query" required="true" |
632 | name="captcha_id"> |
633 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
634 | ID for the generated captcha |
635 | </wadl:doc> |
636 | - |
637 | - </wadl:param> |
638 | - <wadl:param style="query" required="true" |
639 | - name="email"> |
640 | - <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
641 | -Email address. |
642 | -</wadl:doc> |
643 | - |
644 | - </wadl:param> |
645 | - </wadl:representation> |
646 | - </wadl:request> |
647 | - |
648 | - </wadl:method> |
649 | - <wadl:method id="registrations-request_password_reset_token" name="POST"> |
650 | - <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
651 | -Generate a new captcha |
652 | -</wadl:doc> |
653 | - <wadl:request> |
654 | - <wadl:representation |
655 | - mediaType="application/x-www-form-urlencoded"> |
656 | - <wadl:param style="query" name="ws.op" |
657 | - required="true" fixed="request_password_reset_token"> |
658 | - <wadl:doc>The name of the operation being invoked.</wadl:doc> |
659 | - </wadl:param> |
660 | - <wadl:param style="query" required="true" |
661 | - name="email"> |
662 | - <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
663 | -Email address. |
664 | -</wadl:doc> |
665 | - |
666 | - </wadl:param> |
667 | - </wadl:representation> |
668 | - </wadl:request> |
669 | - |
670 | - </wadl:method> |
671 | - <wadl:method id="registrations-set_new_password" name="POST"> |
672 | - <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
673 | -Generate a new captcha |
674 | -</wadl:doc> |
675 | - <wadl:request> |
676 | - <wadl:representation |
677 | - mediaType="application/x-www-form-urlencoded"> |
678 | - <wadl:param style="query" name="ws.op" |
679 | - required="true" fixed="set_new_password"> |
680 | - <wadl:doc>The name of the operation being invoked.</wadl:doc> |
681 | - </wadl:param> |
682 | - <wadl:param style="query" required="true" |
683 | - name="email"> |
684 | - <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
685 | -Email address. |
686 | -</wadl:doc> |
687 | - |
688 | - </wadl:param> |
689 | - <wadl:param style="query" required="true" |
690 | - name="token"> |
691 | - <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
692 | -Password reset token. |
693 | -</wadl:doc> |
694 | - |
695 | - </wadl:param> |
696 | - <wadl:param style="query" required="true" |
697 | - name="new_password"> |
698 | - <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
699 | -New password |
700 | -</wadl:doc> |
701 | - |
702 | - </wadl:param> |
703 | - </wadl:representation> |
704 | - </wadl:request> |
705 | - |
706 | - </wadl:method> |
707 | - |
708 | + |
709 | + </wadl:param> |
710 | + <wadl:param style="query" required="true" |
711 | + name="email"> |
712 | + <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
713 | +Email address. |
714 | +</wadl:doc> |
715 | + |
716 | + </wadl:param> |
717 | + </wadl:representation> |
718 | + </wadl:request> |
719 | + |
720 | + </wadl:method> |
721 | </wadl:resource_type> |
722 | |
723 | - |
724 | + |
725 | <!--End resource_type definitions for collection resources.--> |
726 | |
727 | <!--Begin representation and resource_type definitions for entry |
728 | resources and the collections that contain them. --> |
729 | - |
730 | + |
731 | <wadl:resource_type id="account"> |
732 | - |
733 | + |
734 | <wadl:method name="GET" id="account-get"> |
735 | <wadl:response> |
736 | <wadl:representation |
737 | @@ -606,7 +632,7 @@ |
738 | </wadl:request> |
739 | </wadl:method> |
740 | |
741 | - |
742 | + |
743 | |
744 | </wadl:resource_type> |
745 | |
746 | @@ -634,7 +660,7 @@ |
747 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
748 | Primary email address |
749 | </wadl:doc> |
750 | - |
751 | + |
752 | </wadl:param> |
753 | <wadl:param style="plain" required="true" |
754 | path="$['unverified_emails']" |
755 | @@ -642,14 +668,14 @@ |
756 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
757 | List of unverified emails |
758 | </wadl:doc> |
759 | - |
760 | + |
761 | </wadl:param> |
762 | <wadl:param style="plain" required="true" |
763 | path="$['id']" name="id"> |
764 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
765 | Account ID |
766 | </wadl:doc> |
767 | - |
768 | + |
769 | </wadl:param> |
770 | <wadl:param style="plain" required="true" |
771 | path="$['verified_emails']" |
772 | @@ -657,7 +683,7 @@ |
773 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
774 | List of verified emails |
775 | </wadl:doc> |
776 | - |
777 | + |
778 | </wadl:param> |
779 | </wadl:representation> |
780 | |
781 | @@ -669,7 +695,7 @@ |
782 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
783 | Primary email address |
784 | </wadl:doc> |
785 | - |
786 | + |
787 | </wadl:param> |
788 | <wadl:param style="plain" required="false" |
789 | path="$['unverified_emails']" |
790 | @@ -677,14 +703,14 @@ |
791 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
792 | List of unverified emails |
793 | </wadl:doc> |
794 | - |
795 | + |
796 | </wadl:param> |
797 | <wadl:param style="plain" required="false" |
798 | path="$['id']" name="id"> |
799 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
800 | Account ID |
801 | </wadl:doc> |
802 | - |
803 | + |
804 | </wadl:param> |
805 | <wadl:param style="plain" required="false" |
806 | path="$['verified_emails']" |
807 | @@ -692,7 +718,7 @@ |
808 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
809 | List of verified emails |
810 | </wadl:doc> |
811 | - |
812 | + |
813 | </wadl:param> |
814 | </wadl:representation> |
815 | |
816 | @@ -731,10 +757,10 @@ |
817 | </wadl:param> |
818 | </wadl:representation> |
819 | |
820 | - |
821 | - |
822 | + |
823 | + |
824 | <wadl:resource_type id="authentication"> |
825 | - |
826 | + |
827 | <wadl:method name="GET" id="authentication-get"> |
828 | <wadl:response> |
829 | <wadl:representation |
830 | @@ -762,7 +788,7 @@ |
831 | </wadl:request> |
832 | </wadl:method> |
833 | |
834 | - |
835 | + |
836 | |
837 | </wadl:resource_type> |
838 | |
839 | @@ -790,7 +816,7 @@ |
840 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
841 | Primary email address |
842 | </wadl:doc> |
843 | - |
844 | + |
845 | </wadl:param> |
846 | <wadl:param style="plain" required="true" |
847 | path="$['unverified_emails']" |
848 | @@ -798,14 +824,14 @@ |
849 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
850 | List of unverified emails |
851 | </wadl:doc> |
852 | - |
853 | + |
854 | </wadl:param> |
855 | <wadl:param style="plain" required="true" |
856 | path="$['id']" name="id"> |
857 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
858 | Account ID |
859 | </wadl:doc> |
860 | - |
861 | + |
862 | </wadl:param> |
863 | <wadl:param style="plain" required="true" |
864 | path="$['verified_emails']" |
865 | @@ -813,7 +839,7 @@ |
866 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
867 | List of verified emails |
868 | </wadl:doc> |
869 | - |
870 | + |
871 | </wadl:param> |
872 | </wadl:representation> |
873 | |
874 | @@ -825,7 +851,7 @@ |
875 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
876 | Primary email address |
877 | </wadl:doc> |
878 | - |
879 | + |
880 | </wadl:param> |
881 | <wadl:param style="plain" required="false" |
882 | path="$['unverified_emails']" |
883 | @@ -833,14 +859,14 @@ |
884 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
885 | List of unverified emails |
886 | </wadl:doc> |
887 | - |
888 | + |
889 | </wadl:param> |
890 | <wadl:param style="plain" required="false" |
891 | path="$['id']" name="id"> |
892 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
893 | Account ID |
894 | </wadl:doc> |
895 | - |
896 | + |
897 | </wadl:param> |
898 | <wadl:param style="plain" required="false" |
899 | path="$['verified_emails']" |
900 | @@ -848,7 +874,7 @@ |
901 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
902 | List of verified emails |
903 | </wadl:doc> |
904 | - |
905 | + |
906 | </wadl:param> |
907 | </wadl:representation> |
908 | |
909 | @@ -888,10 +914,10 @@ |
910 | </wadl:param> |
911 | </wadl:representation> |
912 | |
913 | - |
914 | - |
915 | + |
916 | + |
917 | <wadl:resource_type id="captcha"> |
918 | - |
919 | + |
920 | <wadl:method name="GET" id="captcha-get"> |
921 | <wadl:response> |
922 | <wadl:representation |
923 | @@ -918,7 +944,7 @@ |
924 | </wadl:request> |
925 | </wadl:method> |
926 | |
927 | - |
928 | + |
929 | |
930 | </wadl:resource_type> |
931 | |
932 | @@ -945,14 +971,14 @@ |
933 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
934 | Captcha content |
935 | </wadl:doc> |
936 | - |
937 | + |
938 | </wadl:param> |
939 | <wadl:param style="plain" required="true" |
940 | path="$['id']" name="id"> |
941 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
942 | Captcha ID |
943 | </wadl:doc> |
944 | - |
945 | + |
946 | </wadl:param> |
947 | </wadl:representation> |
948 | |
949 | @@ -963,14 +989,14 @@ |
950 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
951 | Captcha content |
952 | </wadl:doc> |
953 | - |
954 | + |
955 | </wadl:param> |
956 | <wadl:param style="plain" required="false" |
957 | path="$['id']" name="id"> |
958 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
959 | Captcha ID |
960 | </wadl:doc> |
961 | - |
962 | + |
963 | </wadl:param> |
964 | </wadl:representation> |
965 | |
966 | @@ -1009,10 +1035,10 @@ |
967 | </wadl:param> |
968 | </wadl:representation> |
969 | |
970 | - |
971 | - |
972 | + |
973 | + |
974 | <wadl:resource_type id="registration"> |
975 | - |
976 | + |
977 | <wadl:method name="GET" id="registration-get"> |
978 | <wadl:response> |
979 | <wadl:representation |
980 | @@ -1040,7 +1066,7 @@ |
981 | </wadl:request> |
982 | </wadl:method> |
983 | |
984 | - |
985 | + |
986 | |
987 | </wadl:resource_type> |
988 | |
989 | @@ -1068,7 +1094,7 @@ |
990 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
991 | Primary email address |
992 | </wadl:doc> |
993 | - |
994 | + |
995 | </wadl:param> |
996 | <wadl:param style="plain" required="true" |
997 | path="$['unverified_emails']" |
998 | @@ -1076,14 +1102,14 @@ |
999 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
1000 | List of unverified emails |
1001 | </wadl:doc> |
1002 | - |
1003 | + |
1004 | </wadl:param> |
1005 | <wadl:param style="plain" required="true" |
1006 | path="$['id']" name="id"> |
1007 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
1008 | Account ID |
1009 | </wadl:doc> |
1010 | - |
1011 | + |
1012 | </wadl:param> |
1013 | <wadl:param style="plain" required="true" |
1014 | path="$['verified_emails']" |
1015 | @@ -1091,7 +1117,7 @@ |
1016 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
1017 | List of verified emails |
1018 | </wadl:doc> |
1019 | - |
1020 | + |
1021 | </wadl:param> |
1022 | </wadl:representation> |
1023 | |
1024 | @@ -1103,7 +1129,7 @@ |
1025 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
1026 | Primary email address |
1027 | </wadl:doc> |
1028 | - |
1029 | + |
1030 | </wadl:param> |
1031 | <wadl:param style="plain" required="false" |
1032 | path="$['unverified_emails']" |
1033 | @@ -1111,14 +1137,14 @@ |
1034 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
1035 | List of unverified emails |
1036 | </wadl:doc> |
1037 | - |
1038 | + |
1039 | </wadl:param> |
1040 | <wadl:param style="plain" required="false" |
1041 | path="$['id']" name="id"> |
1042 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
1043 | Account ID |
1044 | </wadl:doc> |
1045 | - |
1046 | + |
1047 | </wadl:param> |
1048 | <wadl:param style="plain" required="false" |
1049 | path="$['verified_emails']" |
1050 | @@ -1126,7 +1152,7 @@ |
1051 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
1052 | List of verified emails |
1053 | </wadl:doc> |
1054 | - |
1055 | + |
1056 | </wadl:param> |
1057 | </wadl:representation> |
1058 | |
1059 | @@ -1166,10 +1192,10 @@ |
1060 | </wadl:param> |
1061 | </wadl:representation> |
1062 | |
1063 | - |
1064 | - |
1065 | + |
1066 | + |
1067 | <wadl:resource_type id="validation"> |
1068 | - |
1069 | + |
1070 | <wadl:method name="GET" id="validation-get"> |
1071 | <wadl:response> |
1072 | <wadl:representation |
1073 | @@ -1196,7 +1222,7 @@ |
1074 | </wadl:request> |
1075 | </wadl:method> |
1076 | |
1077 | - |
1078 | + |
1079 | |
1080 | </wadl:resource_type> |
1081 | |
1082 | @@ -1224,7 +1250,7 @@ |
1083 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
1084 | Primary email address |
1085 | </wadl:doc> |
1086 | - |
1087 | + |
1088 | </wadl:param> |
1089 | <wadl:param style="plain" required="true" |
1090 | path="$['unverified_emails']" |
1091 | @@ -1232,14 +1258,14 @@ |
1092 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
1093 | List of unverified emails |
1094 | </wadl:doc> |
1095 | - |
1096 | + |
1097 | </wadl:param> |
1098 | <wadl:param style="plain" required="true" |
1099 | path="$['id']" name="id"> |
1100 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
1101 | Account ID |
1102 | </wadl:doc> |
1103 | - |
1104 | + |
1105 | </wadl:param> |
1106 | <wadl:param style="plain" required="true" |
1107 | path="$['verified_emails']" |
1108 | @@ -1247,7 +1273,7 @@ |
1109 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
1110 | List of verified emails |
1111 | </wadl:doc> |
1112 | - |
1113 | + |
1114 | </wadl:param> |
1115 | </wadl:representation> |
1116 | |
1117 | @@ -1259,7 +1285,7 @@ |
1118 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
1119 | Primary email address |
1120 | </wadl:doc> |
1121 | - |
1122 | + |
1123 | </wadl:param> |
1124 | <wadl:param style="plain" required="false" |
1125 | path="$['unverified_emails']" |
1126 | @@ -1267,14 +1293,14 @@ |
1127 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
1128 | List of unverified emails |
1129 | </wadl:doc> |
1130 | - |
1131 | + |
1132 | </wadl:param> |
1133 | <wadl:param style="plain" required="false" |
1134 | path="$['id']" name="id"> |
1135 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
1136 | Account ID |
1137 | </wadl:doc> |
1138 | - |
1139 | + |
1140 | </wadl:param> |
1141 | <wadl:param style="plain" required="false" |
1142 | path="$['verified_emails']" |
1143 | @@ -1282,7 +1308,7 @@ |
1144 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
1145 | List of verified emails |
1146 | </wadl:doc> |
1147 | - |
1148 | + |
1149 | </wadl:param> |
1150 | </wadl:representation> |
1151 | |
1152 | @@ -1322,7 +1348,7 @@ |
1153 | </wadl:param> |
1154 | </wadl:representation> |
1155 | |
1156 | - |
1157 | + |
1158 | <!--End representation and resource_type definitions for entry |
1159 | resources. --> |
1160 | |
1161 | |
1162 | === modified file 'scripts/create_env' |
1163 | --- scripts/create_env 2010-11-03 16:29:36 +0000 |
1164 | +++ scripts/create_env 2011-01-03 20:45:27 +0000 |
1165 | @@ -24,7 +24,7 @@ |
1166 | url='http://10.55.56.106:8000' |
1167 | pypi="-i $url" |
1168 | else |
1169 | - pypi='-f "https://launchpad.net/lazr.restful/+download?start=21" -f "https://launchpad.net/lazr.restfulclient/+download?start=9"' |
1170 | + pypi="-f https://launchpad.net/lazr.restful/+download?start=21 -f https://launchpad.net/lazr.restfulclient/+download?start=9" |
1171 | fi |
1172 | |
1173 | virtualenv --distribute --no-site-packages $ENV |
1174 | @@ -32,7 +32,7 @@ |
1175 | |
1176 | pushd . |
1177 | cd /tmp |
1178 | -if [ -n "$pypi" ]; then |
1179 | +if [ -n "$url" ]; then |
1180 | wget -c "$url/media/dists/egenix-mx-base-3.1.3.zip" |
1181 | unzip egenix-mx-base-3.1.3.zip |
1182 | else |
1183 | |
1184 | === modified file 'scripts/test' |
1185 | --- scripts/test 2010-10-28 13:54:25 +0000 |
1186 | +++ scripts/test 2011-01-03 20:45:27 +0000 |
1187 | @@ -123,8 +123,8 @@ |
1188 | |
1189 | trap SIGINT |
1190 | sudo kill $sso_pid |
1191 | + wait $sso_pid |
1192 | |
1193 | - sleep 1 |
1194 | echo 'Running tests against mock API provider...' |
1195 | cd mockservice/sso_mockserver |
1196 | sudo $ENV python mockserver.py & |
1197 | @@ -133,6 +133,7 @@ |
1198 | (cd doctests && python runner.py -m stories/api-authentications.txt) |
1199 | (cd doctests && python runner.py -m stories/api-workflows.txt) |
1200 | sudo kill $sso_pid |
1201 | + wait $sso_pid |
1202 | fi |
1203 | |
1204 | if [ "$unittest" = true ] |
Changes look alright, and all tests pass. Good work!