Refactor tests for static_pages