-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
50ebd60
commit 58726c5
Showing
4 changed files
with
19 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,12 @@ | |
from jwt import encode | ||
from pydantic import ValidationError | ||
|
||
from corbado_python_sdk import Config, CorbadoSDK, SessionValidationResult | ||
from corbado_python_sdk.services import SessionService | ||
from corbado_python_sdk import ( | ||
Config, | ||
CorbadoSDK, | ||
SessionService, | ||
SessionValidationResult, | ||
) | ||
|
||
TEST_NAME = "Test Name" | ||
TEST_EMAIL = "[email protected]" | ||
|
@@ -114,9 +118,7 @@ def _generate_jwt(cls, iss: str, exp: int, nbf: int) -> str: | |
class TestSessionService(TestBase): | ||
def test_get_and_validate_short_session_value(self): | ||
for valid, token in self._provide_jwts(): | ||
result: SessionValidationResult = self.session_service.get_and_validate_short_session_value( | ||
short_session=token | ||
) | ||
result: SessionValidationResult = self.session_service.get_and_validate_short_session_value(short_session=token) | ||
|
||
self.assertEqual(first=valid, second=result.authenticated) | ||
self.assertEqual(first=valid, second=result.error is None) | ||
|