feat(avatar): complete authorization management
This commit is contained in:
@@ -27,6 +27,9 @@ def mock_auth():
|
||||
auth.takeover_delay_seconds = 30
|
||||
auth.avatar_id = "avatar_123"
|
||||
auth.target_id = "target_user_123"
|
||||
auth.target_type = "user"
|
||||
auth.status = "active"
|
||||
auth.permissions = ["chat", "takeover"]
|
||||
return auth
|
||||
|
||||
|
||||
@@ -83,6 +86,7 @@ def test_check_takeover_enabled_returns_none_when_disabled(mock_db, mock_boxim,
|
||||
|
||||
disabled_auth = MagicMock(spec=Authorization)
|
||||
disabled_auth.takeover_enabled = False
|
||||
disabled_auth.permissions = []
|
||||
auth_filter = MagicMock()
|
||||
auth_filter.filter.return_value = auth_filter
|
||||
auth_filter.first.return_value = disabled_auth
|
||||
|
||||
Reference in New Issue
Block a user