Refactor peer dict creation in the announce test