Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 28, 2025
1 parent 130a70d commit c29985f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
6 changes: 4 additions & 2 deletions tests/test_crypto.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from django.test import TestCase
from unittest.mock import patch

from django.test import TestCase

from knox.crypto import create_token_string, hash_token, make_hex_compatible
from knox.settings import knox_settings
from knox.crypto import create_token_string, make_hex_compatible, hash_token


class CryptoUtilsTestCase(TestCase):
Expand Down
10 changes: 6 additions & 4 deletions tests/test_models.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
from django.test import TestCase, override_settings
from datetime import timedelta

from django.contrib.auth import get_user_model
from django.utils import timezone
from django.core.exceptions import ImproperlyConfigured
from datetime import timedelta
from django.test import TestCase, override_settings
from django.utils import timezone
from freezegun import freeze_time

from knox.settings import CONSTANTS, knox_settings
from knox.models import AuthToken, get_token_model
from knox.settings import CONSTANTS, knox_settings


class AuthTokenTests(TestCase):
"""
Expand Down
13 changes: 6 additions & 7 deletions tests/test_settings.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import hashlib
from datetime import timedelta
from unittest import mock
import hashlib
from django.test import override_settings
from django.core.signals import setting_changed

from django.conf import settings
from django.core.signals import setting_changed
from django.test import override_settings

from knox.settings import (
CONSTANTS,
knox_settings,
reload_api_settings,
IMPORT_STRINGS
CONSTANTS, IMPORT_STRINGS, knox_settings, reload_api_settings,
)


class TestKnoxSettings:
@override_settings(REST_KNOX={
'AUTH_TOKEN_CHARACTER_LENGTH': 32,
Expand Down

0 comments on commit c29985f

Please sign in to comment.