0001-misc-apply-black-52638.patch
src/authentic2/utils/__init__.py | ||
---|---|---|
1151 | 1151 | |
1152 | 1152 | |
1153 | 1153 |
def simulate_authentication(request, user, method, backend=None, service=None, **kwargs): |
1154 |
'''Simulate a normal login by eventually forcing a backend attribute on the
|
|
1155 |
user instance'''
|
|
1154 |
"""Simulate a normal login by eventually forcing a backend attribute on the
|
|
1155 |
user instance"""
|
|
1156 | 1156 |
if not getattr(user, 'backend', None) and not backend: |
1157 | 1157 |
backend = 'authentic2.backends.models_backend.ModelBackend' |
1158 | 1158 |
if backend: |
1159 |
- |