Skip to content

Commit e12ca42

Browse files
test: adding 2 additional tests to user.py (#595)
# Description Adding 2 more tests to user.py to improve build code coverage - [X] Follow the [`CONTRIBUTING` Guide](https://github.com/a2aproject/a2a-python/blob/main/CONTRIBUTING.md). - [X] Make your Pull Request title in the <https://www.conventionalcommits.org/> specification. - [X] Ensure the tests and linter pass (Run `bash scripts/format.sh` from the repository root to format) - [N/A] Appropriate docs were updated (if necessary) Fixes #<issue_number_goes_here> 🦕 N/A --------- Co-authored-by: Lukasz Kawka <luk.kawka@gmail.com>
1 parent 04bcafc commit e12ca42

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/auth/test_user.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
import unittest
22

3-
from a2a.auth.user import UnauthenticatedUser
3+
from inspect import isabstract
4+
5+
from a2a.auth.user import UnauthenticatedUser, User
6+
7+
8+
class TestUser(unittest.TestCase):
9+
def test_is_abstract(self):
10+
self.assertTrue(isabstract(User))
411

512

613
class TestUnauthenticatedUser(unittest.TestCase):
14+
def test_is_user_subclass(self):
15+
self.assertTrue(issubclass(UnauthenticatedUser, User))
16+
717
def test_is_authenticated_returns_false(self):
818
user = UnauthenticatedUser()
919
self.assertFalse(user.is_authenticated)

0 commit comments

Comments
 (0)