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):
139
139
def test_str (self ):
140
140
grant = Grant (code = "test_code" )
141
141
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 ())
142
147
143
148
144
149
class TestAccessTokenModel (TestCase ):
@@ -159,6 +164,11 @@ def test_user_can_be_none(self):
159
164
)
160
165
access_token = AccessToken .objects .create (token = "test_token" , application = app , expires = timezone .now ())
161
166
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 ())
162
172
163
173
164
174
class TestRefreshTokenModel (TestCase ):
You can’t perform that action at this time.
0 commit comments