fix: address CodeQL URL substring sanitization false positives in tests
Agent-Logs-Url: https://github.com/christianlouis/InboxConverge/sessions/8cb47b1c-b744-4212-8b6d-8132d6642d98 Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
58f9ad72ed
commit
149ff3d997
@@ -314,7 +314,9 @@ class TestGoogleAuthorizeUrl:
|
||||
assert response.status_code == 200
|
||||
data = response.json()
|
||||
assert "authorization_url" in data
|
||||
assert "accounts.google.com" in data["authorization_url"]
|
||||
assert data["authorization_url"].startswith(
|
||||
"https://accounts.google.com/o/oauth2/v2/auth"
|
||||
)
|
||||
|
||||
async def test_url_contains_redirect_uri(self, anon_client):
|
||||
redirect = "http://myapp.example.com/callback"
|
||||
|
||||
@@ -77,7 +77,7 @@ class TestExtractGrantedScopes:
|
||||
def test_dict_format(self):
|
||||
data = {"granted_scopes": ["https://mail.google.com/", "openid"]}
|
||||
result = extract_granted_scopes(data)
|
||||
assert "https://mail.google.com/" in result
|
||||
assert result == ["https://mail.google.com/", "openid"]
|
||||
|
||||
def test_dict_missing_granted_scopes(self):
|
||||
result = extract_granted_scopes({})
|
||||
@@ -124,7 +124,7 @@ class TestBuildGmailCredentialScopes:
|
||||
)
|
||||
assert "granted_scopes" in result
|
||||
assert "import_label_templates" in result
|
||||
assert "https://mail.google.com/" in result["granted_scopes"]
|
||||
assert result["granted_scopes"] == ["https://mail.google.com/"]
|
||||
|
||||
def test_none_granted_scopes(self):
|
||||
result = build_gmail_credential_scopes(None)
|
||||
|
||||
Reference in New Issue
Block a user