def test_model_with_additional_data(self):
        related_model = SimpleModel.objects.create(text='Log my reference')
        obj_with_additional_data = AdditionalDataIncludedModel(
            label='Additional data to log entries', related=related_model)
        obj_with_additional_data.save()
        self.assertTrue(obj_with_additional_data.history.count() == 1,
                        msg="There is 1 log entry")
        log_entry = obj_with_additional_data.history.get()
        self.assertIsNotNone(log_entry.additional_data)
        extra_data = log_entry.additional_data
        self.assertTrue(extra_data['related_model_text'] == related_model.text,
                        msg="Related model's text is logged")
        self.assertTrue(extra_data['related_model_id'] == related_model.id,
                        msg="Related model's id is logged")
dataset/ETHPy150Open jjkester/django-auditlog/src/auditlog_tests/tests.py/AdditionalDataModelTest.test_model_with_additional_data/original