def METHOD_NAME(
    self,
    mock_send_email,
    mock_get_codeowner_file,
):
    with self.tasks() and self.feature({"organizations:integrations-codeowners": True}):
        commit = Commit.objects.create(
            repository_id=self.repo.id,
            organization_id=self.organization.id,
            key="1234",
            message="Initial commit",
        )
        CommitFileChange.objects.create(
            organization_id=self.organization.id,
            commit=commit,
            filename=".github/CODEOWNERS",
            type="A",
        )
        code_owners_auto_sync(commit.id)
    code_owners = ProjectCodeOwners.objects.get(id=self.code_owners.id)
    assert code_owners.raw == self.data["raw"]
    mock_send_email.assert_called_once_with()