[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Pulp-list] Paste library



On 07/19/2011 03:10 PM, James Slagle wrote:
I added a test for Oauth authentication (functional/test_oauth.py).

In doing so, I made use of a library called paste that you may need
to install to run the functional tests.  The package name is python-paste,
I've already installed it on the Jenkins build instances.  If you're running
Fedora, you probably already have it installed.

Paste has many different components, but the one I wanted to make use of was
paste.fixture.TestApp.  TestApp allows you to wrap a wsgi app, and make
requests and return responses as if you were talking to an actual httpd
instance of your wsgi app.

This is useful if you want to write a test that exercies the request/response
lifecycle, but don't want to have to rely on a locally running webserver or
external resource to do so.

Dude, SICK. All of our tests start at the API level and it'll be nice to be able to add them up at the controller level.

--
Jay Dobies
RHCE# 805008743336126
Freenode: jdob @ #pulp
http://pulpproject.org | http://blog.pulpproject.org


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]