Merge lp:~eday/nova/api-tests into lp:~hudson-openstack/nova/trunk
| Status: | Merged |
|---|---|
| Approved by: | Eric Day on 2010-08-19 |
| Approved revision: | 253 |
| Merged at revision: | 249 |
| Proposed branch: | lp:~eday/nova/api-tests |
| Merge into: | lp:~hudson-openstack/nova/trunk |
| Prerequisite: | lp:~eday/nova/api-port |
| Diff against target: |
304 lines (+192/-7) (has conflicts) 5 files modified
nova/api/__init__.py (+6/-0) nova/api/test.py (+61/-0) nova/wsgi.py (+12/-5) nova/wsgi_test.py (+96/-0) pylintrc (+17/-2) Text conflict in nova/api/__init__.py Text conflict in nova/wsgi.py Text conflict in pylintrc |
| To merge this branch: | bzr merge lp:~eday/nova/api-tests |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Matt Dietz (community) | 2010-08-18 | Approve on 2010-08-19 | |
|
Review via email:
|
|||
Commit Message
Added unit tests for WSGI helpers and base WSGI API.
Description of the Change
Added unit tests for WSGI helpers and base WSGI API.
| Michael Gundlach (gundlach) wrote : | # |
| Eric Day (eday) wrote : | # |
Ahh, great points on using the webob stuff, I'm play around with those and resubmit. I agree the self.called isn't the best looking solution, but because having to match the environ directly, mox wasn't trivial to use (more code/setup). I'll try to think of something cleaner.
| Eric Day (eday) wrote : | # |
Ready for another review, used webob to make things quite a bit simpler.
| Michael Gundlach (gundlach) wrote : | # |
nova/api/
| Michael Gundlach (gundlach) wrote : | # |
is C0103 actually firing on def show(self, req, id)? If so, great, but I thought maybe you left it there by accident.
| Eric Day (eday) wrote : | # |
Yeah, the warning is firing because 'id' is a reserved keyword, but routes generates this automatically. Only thing to do is suppress. The merge conflicts are not always accurate with what will happen in trunk, LP is doing something else on the back-end.
| Matt Dietz (cerberus) wrote : | # |
As per discussion in #openstack, this looks like a great start for testing the API.
| Michael Gundlach (gundlach) wrote : | # |
So even though your diff showed a bunch of added lines like
">>>>>>>>>>>>>>>>>> TREE", those aren't actually part of the diff that will
be applied? I don't know how to review the code if that's the case...
On Thu, Aug 19, 2010 at 12:24 PM, Eric Day <email address hidden> wrote:
> Yeah, the warning is firing because 'id' is a reserved keyword, but routes
> generates this automatically. Only thing to do is suppress. The merge
> conflicts are not always accurate with what will happen in trunk, LP is
> doing something else on the back-end.
> --
> https:/
> Your team Nova Core is requested to review the proposed merge of
> lp:~eday/nova/api-tests into lp:nova.
>
Confidentiality Notice: This e-mail message (including any attached or
embedded documents) is intended for the exclusive and confidential use of the
individual or entity to which this message is addressed, and unless otherwise
expressly indicated, is confidential and privileged information of Rackspace.
Any dissemination, distribution or copying of the enclosed material is prohibited.
If you receive this transmission in error, please notify us immediately by e-mail
at <email address hidden>, and delete the original message.
Your cooperation is appreciated.


257: Maybe accept id explicitly to also verify that nothing was passed except for the id?
282: Replace all this with webob.Request. blank(' /').environ . You can also use Request( environ) .get_response( some_wsgi_ app) to simplify some of your code if you wish. Since these tests can assume that webob works properly (they're not testing webob), I don't see a reason not to use it to simplify the WSGI.
I am not totally comfortable with the self.called approach to testing, but I can't think of anything better, so that's fine :)
I see you changed 'disable' back to 'disable-msg' which is fine; I need to change to 'disable' across the whole project, in a separate branch, now that pylint 0.21.1 has changed their API.