I am writing views, not so keen to write templates right away.
But I need to test my program by submitting post requests.
How do i simulate HTTP Post from within
For such cases I think RequestFactory is ideally suited.
It works just like django's test client with the difference that it let's you create a request object that you can use anywhere. So you could just create your own request object and pass it to your view or form for testing.
I like this method of testing more then using the test client, since it comes closer to pure
unit testing. That is, testing a single piece of code. If you're using the test client, there are more layers added before the actual code you're testing is reached.