Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » synthetic request objects for unittesting [RSS Feed]

#1 Nov. 26, 2005 22:07:40

a.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

synthetic request objects for unittesting


Hi all,

I was thinking about writing some unit tests for my views and I
realized that this would be much helped by being able to get a
synthetic request object in the mix that would let me:
a) pass in some parameters
b) buffer up the response for testing

Is there some "utils" way to do this. Also, before I go groveling
through the code does anyone have any thoughts on whether this is a
good idea?

Thx

Antonio

Offline

#2 Nov. 27, 2005 00:34:09

h.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

synthetic request objects for unittesting


>Is there some "utils" way to do this. Also, before I go groveling
>through the code does anyone have any thoughts on whether this is a
>good idea?

That's what I want to do some day for my testing framework. Currently I
only do model tests and tests for non-request/response functionality
(depending on your project that will get you quite far!).https://simon.bofh.ms/cgi-bin/trac-django-projects.cgi/wiki/DjangoTestingIt could be done quite easily by implementing a WSGI host that's just
not bound to any server at all, but builds a synthetic WSGI environment
for the request.

bye, Georg

Offline

  • Root
  • » Django
  • » synthetic request objects for unittesting [RSS Feed]

Board footer

Moderator control

Enjoy the 24th of April
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support