class AddItemToCollectionTest(TestCase):

    def test_success_when_not_added_before(self):
        response = self.client.post('/add-item-to-collection')
self.assertEqual(response.status_code, 200)
self.assertJSONEqual(str(response.content, encoding='utf8'), {'status':
    'success'})
How to use Django's assertJSONEqual to verify response of view returning JsonResponse