File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,11 @@ class TestGrantModel(TestCase):
139139 def test_str (self ):
140140 grant = Grant (code = "test_code" )
141141 self .assertEqual ("%s" % grant , grant .code )
142+
143+ def test_expires_can_be_none (self ):
144+ grant = Grant (code = "test_code" )
145+ self .assertIsNone (grant .expires )
146+ self .assertFalse (grant .is_expired ())
142147
143148
144149class TestAccessTokenModel (TestCase ):
@@ -159,6 +164,11 @@ def test_user_can_be_none(self):
159164 )
160165 access_token = AccessToken .objects .create (token = "test_token" , application = app , expires = timezone .now ())
161166 self .assertIsNone (access_token .user )
167+
168+ def test_expires_can_be_none (self ):
169+ access_token = AccessToken (token = "test_token" )
170+ self .assertIsNone (access_token .expires )
171+ self .assertFalse (access_token .is_expired ())
162172
163173
164174class TestRefreshTokenModel (TestCase ):
You can’t perform that action at this time.
0 commit comments