We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d69f44a commit 746bb17Copy full SHA for 746bb17
tests/test_request.py
@@ -230,6 +230,13 @@ def authenticate(self, request):
230
with pytest.raises(WrappedAttributeError, match=expected):
231
request.user
232
233
+ # python 2 hasattr fails for *any* exception, not just AttributeError
234
+ if six.PY2:
235
+ return
236
+
237
+ with pytest.raises(WrappedAttributeError, match=expected):
238
+ hasattr(request, 'user')
239
240
241
login(request, self.user)
242
0 commit comments