django-trench provides a set of REST API endpoints to supplement django-rest-framework with multi-factor authentication (MFA, 2FA). It supports both standard built-in authentication methods, as well as JWT (JSON Web Token).
Other
274
stars
57
forks
source link
Unordered MFAMethod causing pagination warning during tests #195
Describe the bug
Warning when running tests due to no list ordering.
To Reproduce
Steps to reproduce the behavior:
Hitting this endpoint in tests: /mfa/user-active-methods/
Yields this error: django.core.paginator.UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list: <class 'authorization.models.MFAMethod'> QuerySet.
Expected behavior
The endpoint should have an ordering - or the model should have default ordering.
Describe the bug Warning when running tests due to no list ordering.
To Reproduce Steps to reproduce the behavior:
Expected behavior The endpoint should have an ordering - or the model should have default ordering.