Skip to content

Commit

Permalink
test coverage for __str__ method in Application model
Browse files Browse the repository at this point in the history
  • Loading branch information
masci committed Feb 5, 2014
1 parent f895766 commit ecd4af1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions oauth2_provider/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,15 @@ def test_grant_implicit_redirect_uris(self):
)

self.assertRaises(ValidationError, app.full_clean)

def test_str(self):
app = Application(
redirect_uris="",
user=self.user,
client_type=Application.CLIENT_CONFIDENTIAL,
authorization_grant_type=Application.GRANT_IMPLICIT,
)
self.assertEqual("%s" % app, app.client_id)

app.name = "test_app"
self.assertEqual("%s" % app, "test_app")

0 comments on commit ecd4af1

Please sign in to comment.