mirror of
https://github.com/stack-auth/stack.git
synced 2026-07-20 21:29:36 +08:00
fix: update team member profile test to include required user_id field
The user_id field was added to TeamMemberProfile during team management implementation but the pre-existing model test was not updated.
This commit is contained in:
@@ -66,17 +66,19 @@ class TestTeamMemberProfile:
|
||||
from stack_auth.models.teams import TeamMemberProfile
|
||||
|
||||
data = {
|
||||
"userId": "user1",
|
||||
"displayName": "John",
|
||||
"profileImageUrl": "https://example.com/img.png",
|
||||
}
|
||||
profile = TeamMemberProfile.model_validate(data)
|
||||
assert profile.user_id == "user1"
|
||||
assert profile.display_name == "John"
|
||||
assert profile.profile_image_url == "https://example.com/img.png"
|
||||
|
||||
def test_nullable_fields(self) -> None:
|
||||
from stack_auth.models.teams import TeamMemberProfile
|
||||
|
||||
data = {}
|
||||
data = {"userId": "user1"}
|
||||
profile = TeamMemberProfile.model_validate(data)
|
||||
assert profile.display_name is None
|
||||
assert profile.profile_image_url is None
|
||||
|
||||
Reference in New Issue
Block a user