

def test_update(self):
    'Updates are logged correctly.'
    obj = self.obj
    obj.boolean = True
    obj.save()
    self.assertTrue((obj.history.filter(action=LogEntry.Action.UPDATE).count() == 1), msg="There is one log entry for 'UPDATE'")
    history = obj.history.get(action=LogEntry.Action.UPDATE)
    self.assertJSONEqual(history.changes, '{"boolean": ["False", "True"]}', msg='The change is correctly logged')

dataset/ETHPy150Open jjkester/django-auditlog/src/auditlog_tests/tests.py SimpleModelTest.test_update/original