def test_json_field_modify(self):
        json_obj_1 = {'a': 1, 'b': 2}
        json_obj_2 = {'a': 3, 'b': 4}

        obj = self.json_model.objects.create(json=json_obj_1)
        self.assertEqual(obj.json, json_obj_1)
        obj.json = json_obj_2

        self.assertEqual(obj.json, json_obj_2)
        obj.save()
        self.assertEqual(obj.json, json_obj_2)

        self.assertTrue(obj)
Test modifying a JSON object in our JSONField
dataset/ETHPy150Open bradjasper/django-jsonfield/jsonfield/tests.py/JSONFieldTest.test_json_field_modify