Fit the guide change to the catalogue: Siskiyou Peaks guide, Circle of Solitude sources, and honest no-GPX wording
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
1601f7c755
commit
978514a43e
7 files changed
+67
-13
No files matched your search
@@ -83,6 +83,21 @@ class ExactGuideTest(unittest.TestCase):
|
||||
rec["guide"] = [dict(BOOK, access="free", url="https://author.example/route", link_is="author")]
|
||||
self.assertEqual(trail.official_link(rec)[1], "Official site")
|
||||
|
||||
def test_the_no_gpx_wording_follows_what_the_page_offers(self):
|
||||
from olt import facets
|
||||
unclear = {"creator": "A", "line_policy": "unclear"}
|
||||
rec = route(hike={"official_url": "https://author.example/route"}, route=unclear)
|
||||
self.assertEqual(facets.gpx(rec), "elsewhere")
|
||||
self.assertEqual(facets.gpx_status_text(rec), "Not here, see the official site")
|
||||
rec = route(hike={"official_url": "https://shop.example/sierra-south"}, route=unclear)
|
||||
self.assertEqual(facets.gpx_status_text(rec), "Not here, see the guide")
|
||||
rec = route(route=unclear)
|
||||
self.assertEqual(facets.gpx_status_text(rec), "Not here, see the guide")
|
||||
rec = route(route=unclear, guide=None)
|
||||
rec["guide"] = []
|
||||
self.assertEqual(facets.gpx_status_text(rec), "Not here")
|
||||
self.assertNotIn("official site", facets.gpx_status_text(route(route=unclear)))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -154,7 +154,7 @@ class TrailPageTest(unittest.TestCase):
|
||||
self.assertNotIn("Where the hiking facts come from", body)
|
||||
# no track: the page says so plainly and points at the source
|
||||
self.assertIn("No GPX here", t)
|
||||
self.assertIn("GPX Not here, see the official site", t)
|
||||
self.assertIn("GPX Not here", t)
|
||||
self.assertIn('href="#track"', top)
|
||||
self.assertIn('id="track"', top)
|
||||
|
||||
|
||||
Reference in new issue
Block a user