From 666ca41184e112dac302c06fedabca9bef735eee Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Thu, 5 Mar 2026 06:09:57 -0500 Subject: [PATCH] fix: use full shop slug URL in sandbox functional tests Tests were using /s/{shop.id} which returns 302 redirect instead of /s/{shop.id}/{shop.slug} which returns 200 directly. Co-Authored-By: Claude Opus 4.6 --- make_post_sell/tests/test_functional.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/make_post_sell/tests/test_functional.py b/make_post_sell/tests/test_functional.py index 5b3817c..63105bb 100644 --- a/make_post_sell/tests/test_functional.py +++ b/make_post_sell/tests/test_functional.py @@ -4235,7 +4235,7 @@ class TestAnalytics(_AuthenticatedBase): ) # Visit the shop page — toolbar should be present - res = self.testapp.get(f"/s/{shop.id}", status=200) + res = self.testapp.get(f"/s/{shop.id}/{shop.slug}", status=200) self.assertIn("sandbox-toolbar", res.text) self.assertIn("sandbox.js", res.text) @@ -4246,7 +4246,7 @@ class TestAnalytics(_AuthenticatedBase): ) # sandbox_mode is off by default - res = self.testapp.get(f"/s/{shop.id}", status=200) + res = self.testapp.get(f"/s/{shop.id}/{shop.slug}", status=200) self.assertNotIn("sandbox-toolbar", res.text) def test_sandbox_mode_doesnt_affect_other_settings(self): @@ -4410,7 +4410,7 @@ class TestAnalytics(_AuthenticatedBase): ) # Without S3 credentials, data-has-bucket should not be present - res = self.testapp.get(f"/s/{shop.id}", status=200) + res = self.testapp.get(f"/s/{shop.id}/{shop.slug}", status=200) self.assertNotIn('data-has-bucket="1"', res.text) # Save S3 credentials @@ -4427,5 +4427,5 @@ class TestAnalytics(_AuthenticatedBase): ) # Now data-has-bucket="1" should be present - res = self.testapp.get(f"/s/{shop.id}", status=200) + res = self.testapp.get(f"/s/{shop.id}/{shop.slug}", status=200) self.assertIn('data-has-bucket="1"', res.text)