Skip to content
Merged
3 changes: 2 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ omit =
*/site-packages/*
*/__init__.py
*/noxfile.py*
src/a2a/grpc/*

[report]
exclude_lines =
Expand All @@ -15,4 +16,4 @@ exclude_lines =
if TYPE_CHECKING
@abstractmethod
pass
raise ImportError
raise ImportError
8 changes: 8 additions & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,26 @@ coro
datamodel
dunders
genai
getkwargs
gle
inmemory
kwarg
langgraph
lifecycles
linting
lstrips
mockurl
oauthoidc
oidc
opensource
protoc
pyi
pyversions
resub
socio
sse
tagwords
taskupdate
testuuid
typeerror
vulnz
12 changes: 4 additions & 8 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,8 @@ jobs:
- name: Install dependencies
run: uv sync --dev

- name: Run tests
run: uv run pytest
- name: Run tests and check coverage
run: uv run pytest --cov=a2a --cov-report=xml --cov-fail-under=85

- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report-${{ matrix.python-version }}
path: coverage.xml
if-no-files-found: ignore
- name: Show coverage summary in log
run: uv run coverage report
17 changes: 17 additions & 0 deletions tests/auth/test_user.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import unittest

from a2a.auth.user import UnauthenticatedUser


class TestUnauthenticatedUser(unittest.TestCase):
def test_is_authenticated_returns_false(self):
user = UnauthenticatedUser()
self.assertFalse(user.is_authenticated)

def test_user_name_returns_empty_string(self):
user = UnauthenticatedUser()
self.assertEqual(user.user_name, '')


if __name__ == '__main__':
unittest.main()
Loading