Skip to content

Commit ecd4af1

Browse files
committed
test coverage for __str__ method in Application model
1 parent f895766 commit ecd4af1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

oauth2_provider/tests/test_models.py

+12
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,15 @@ def test_grant_implicit_redirect_uris(self):
6060
)
6161

6262
self.assertRaises(ValidationError, app.full_clean)
63+
64+
def test_str(self):
65+
app = Application(
66+
redirect_uris="",
67+
user=self.user,
68+
client_type=Application.CLIENT_CONFIDENTIAL,
69+
authorization_grant_type=Application.GRANT_IMPLICIT,
70+
)
71+
self.assertEqual("%s" % app, app.client_id)
72+
73+
app.name = "test_app"
74+
self.assertEqual("%s" % app, "test_app")

0 commit comments

Comments
 (0)