[Answer]-Can't test changes to the database through Django Test

1👍

You need to refresh the vote instance you have in your test method after calling the view.

idea = Idea.objects.get(pk=idea.pk)
self.assertEqual(idea.votes, 1)

Leave a comment