 <p>django test client uses default base url:</p> <p><a href="http://testserver/" rel="nofollow">http://testserver/</a></p> <p>which makes your test url /accounts/register/ into:</p> <p><a href="http://testserver/accounts/register/" rel="nofollow">http://testserver/accounts/register/</a></p> <p>so you should add 'testserver' in django sites.site model as a base url. maximum recursion depth exceed because django client did'nt find 'testserver' as a domain in sites.site</p>