Skip to content

test: replay link analysis tests from cassettes - #14

Open
rsiddle wants to merge 1 commit into
mainfrom
test/replay-link-analysis
Open

rsiddle wants to merge 1 commit into
mainfrom
test/replay-link-analysis

Conversation

@rsiddle

@rsiddle rsiddle commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

The link analysis cassettes were recorded back in fae7db0, but the @pytest.mark.vcr markers never made it into that commit. So these tests have been calling the live API on every run since — including AddConnectedPage, which writes to whatever site BING_WEBMASTER_TEST_SITE points at.

Adding the markers is enough for 10 of the 11 tests. The connected page test built its URL from a timestamp, so it could never match its cassette; it now uses a fixed URL, with the matching request line in the cassette updated. Nothing was re-recorded and the recorded response is untouched.

Tested with a dummy API key, so anything still reaching Bing fails loudly: the link analysis tests now pass, where before they failed with InvalidApiKey.

The cassettes were recorded in fae7db0, but the vcr markers never made it
into that commit, so these tests have been hitting the live API ever since,
AddConnectedPage included. The connected page URL was timestamped, so it
could never match its cassette either; it's now fixed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant