Skip to content

Replaced the fragile/wrong urlopen JSON mock#1540

Merged
suecarmol merged 2 commits into
masterfrom
theresnotime/T352896
Jul 6, 2026
Merged

Replaced the fragile/wrong urlopen JSON mock#1540
suecarmol merged 2 commits into
masterfrom
theresnotime/T352896

Conversation

@theresnotime

Copy link
Copy Markdown
Contributor
  • Un-nested test_create_user_and_editor to a real method of OAuthTestCase and removed the skipTest.
  • Replaced the fragile/wrong urlopen JSON mock with a patch of TWLight.users.models.editor_global_userinfo returning
    FAKE_GLOBAL_USERINFO — the idiomatic approach the rest of the suite uses (other tests pass global_userinfo explicitly). This
    guarantees the editor is saved before wp_editcount is read.
  • Removed the now-unused, misleading FAKE_IDENTITY_DATA fixture.
  • Added a comment explaining the save-before-read requirement, referencing T352896.

Assisted-by: Claude Opus 4.8
Bug: T352896

of TWLight.users.models.editor_global_userinfo returning
FAKE_GLOBAL_USERINFO

Assisted-by: Claude Opus 4.8
Bug: T352896
@theresnotime theresnotime requested a review from suecarmol July 6, 2026 12:15
@theresnotime theresnotime marked this pull request as ready for review July 6, 2026 12:15
@theresnotime theresnotime marked this pull request as draft July 6, 2026 12:16
@theresnotime theresnotime marked this pull request as ready for review July 6, 2026 12:25

@suecarmol suecarmol left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, let's merge and see if it works in CICD

@suecarmol suecarmol merged commit 629cf41 into master Jul 6, 2026
2 checks passed
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.

2 participants