Refactoring test_details_page.py