def METHOD_NAME(self):
    Business.objects.create(cc_id=5, cc_name="name_5", cc_owner="owner", cc_company="company")
    with patch(CORE_MODEL_PROJECT_SYNC_PROJECT, MagicMock(side_effect=IntegrityError)):
        project.sync_projects_from_cmdb("user")
        Project.objects.update_business_project_status.assert_called_once_with(
            archived_cc_ids=set(), active_cc_ids={1, 4, 5}
        )
        self.assertEqual(len(Project.objects.all()), 0)
    project.sync_projects_from_cmdb("user")
    self.assertEqual(len(Project.objects.all()), 3)