def test_update_building_audit_log(self):
        """tests that a building update logs an audit_log"""
        # arrange
        building = self.parent_1.to_dict()
        building['gross_floor_area'] = 112233445566

        # act
        self.client.put(
            reverse_lazy("seed:update_building"),
            data=json.dumps({
                'organization_id': self.org.pk,
                'building': building,
            }),
            content_type='application/json'
        )

        # assert
        self.assertEqual(AuditLog.objects.count(), 1)
        audit_log = AuditLog.objects.first()
        self.assertEqual(
            audit_log.content_object,
            self.parent_1.canonical_building
        )
        self.assertTrue('update_building' in audit_log.action)
        self.assertEqual(audit_log.audit_type, LOG)
dataset/ETHPy150Open buildingenergy/buildingenergy-platform/seed/tests/test_views.py/BuildingDetailViewTests.test_update_building_audit_log/original