def test_save_blank_object(self):

        model = JsonModel()
        self.assertEqual(model.empty_default, {})

        model.save()
        self.assertEqual(model.empty_default, {})

        model1 = JsonModel(empty_default={"hey": "now"})
        self.assertEqual(model1.empty_default, {"hey": "now"})

        model1.save()
        self.assertEqual(model1.empty_default, {"hey": "now"})
Test that JSON model can save a blank object as none
dataset/ETHPy150Open bradjasper/django-jsonfield/jsonfield/tests.py/JSONFieldTest.test_save_blank_object