How do you guys test implementations of the django comment framework? A regular post doesnt seem to work because it depends on data from a previous get. An thoughts?
def test_comment(self): item_url = reverse('item', args=['4558']) self.client.login(username=self.username, password=self.password) import datetime test_message = 'test at %s' % datetime.datetime.today() item_view = self.client.get(item_url) comment_submit = self.client.post(item_url, {'comment': test_message}) test = open('test.html', 'w') import os print dir(test) print test.name print os.path.abspath(test.name) test.write(unicode(comment_submit)) item_view = self.client.get(item_url) self.assertContains(item_view, test_message) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.