I am new to testing in django. I am using django nose for TDD.I am using django nose version 1.2 in my virtual environment. I referred the link below for creating my tests.
http://kokoko.fluxionary.net/testing-django-part-1-nose
Currently I need to test the query that I am going to write in my views ie to check whether the query output is correct. I used the code below but test fails:
import nose.tools as nt
nt.assert_true('obj_list' in resp.context)
nt.assert_equal([obj.pk for obj in resp.context['obj_list']], [1])
Any help will be much appreciated. Thanks in advance.