def METHOD_NAME(self):
    project = self.create_project()
    event1 = self.store_event(
        data={
            "event_id": "a" * 32,
            "timestamp": iso_format(before_now(seconds=1)),
            "fingerprint": ["group-1"],
            "tags": {"foo": "bar"},
            "environment": self.environment.name,
        },
        project_id=project.id,
    )
    event2 = self.store_event(
        data={
            "event_id": "b" * 32,
            "timestamp": iso_format(before_now(seconds=1)),
            "fingerprint": ["group-2"],
            "tags": {"foo": "bar"},
            "environment": self.environment.name,
        },
        project_id=project.id,
    )
    target = event1.group
    other = event2.group
    with self.tasks():
        merge_groups([other.id], target.id)
    assert not Group.objects.filter(id=other.id).exists()