Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Refactor: test_jwt.py fully modularized with mock jwt.encode + expiry simulation#1726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
cureprotocols wants to merge17 commits intogoogleapis:main
base:main
Choose a base branch
Loading
fromcureprotocols:refactor/test_jwt-complete

Conversation

@cureprotocols
Copy link

This PR introduces a full refactor oftests/test_jwt.py with the following enhancements:

✅ Split into clean, modular sections:

  • Section 1: Core claim validation (sub, aud, iat)
  • Section 2: JWT header logic and parametrize coverage
  • Section 3: Exception handling for invalid signer & payloads
  • Section 4: Time-based claim handling usingexp,nbf,iat withfreezegun

✅ Introduced smartdummy_encode() to simulatejwt.encode() behavior

  • Simulates errors for missing 'alg'
  • Simulatesexp andnbf time validation
  • Raises runtime and type errors for edge cases

✅ All 15 tests pass using local fixtures and mocks (no external crypto or network dependency)

This refactor improves test clarity, modularity, and CI reliability.
Next steps can include real JWT plug-in,test_identity_pool.py refactor, or CI wiring.


cureprotocolsand others added17 commitsApril 2, 2025 17:40
Swapped from reStructuredText to Markdown for improved readability, badge support, and contributor clarity.This version of the README:- Retains full respect and gratitude for the original authors.- Clarifies project goals and roadmap.- Adds visual indicators for project health and openness to contributors.
@cureprotocolscureprotocols requested review froma team ascode ownersApril 4, 2025 16:38
@google-cla
Copy link

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View thisfailed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@cureprotocols

[8]ページ先頭

©2009-2025 Movatter.jp