-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add tests for newer django-versions * Downgrade checkout and setup-python * Revert "Downgrade checkout and setup-python" This reverts commit dd41222. * Python < 3.7 not available for arch x64 * Handle python < 3.8 * Use PBKDF2PasswordHasher in tests * Update django version in docs * Make hasher used in tests explicit * Cover python 3.7 in tox * Add to changelog
- Loading branch information
Showing
7 changed files
with
72 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
import pkg_resources | ||
try: | ||
from importlib.metadata import version | ||
|
||
__version__ = pkg_resources.get_distribution('django-authtools').version | ||
__version__ = version('django-authtools') | ||
except ImportError: | ||
import pkg_resources | ||
|
||
__version__ = pkg_resources.get_distribution('django-authtools').version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -154,12 +154,12 @@ def test_uses_auth_password_validators(self): | |
|
||
|
||
@skipIfCustomUser | ||
@override_settings(USE_TZ=False, PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',)) | ||
@override_settings(USE_TZ=False) | ||
class UserChangeFormTest(TestCase): | ||
@classmethod | ||
def setUpTestData(cls): | ||
cls.u1 = User.objects.create( | ||
password='sha1$6efc0$f93efe9fd7542f25a7be94871ea45aa95de57161', | ||
password='pbkdf2_sha256$600000$U3$rhq9d758wGq/JU5/+bkG8OqDVY05d04zKD4cuamR+Sk=', | ||
last_login=datetime.datetime(2006, 12, 17, 7, 3, 31), is_superuser=False, username='testclient', | ||
first_name='Test', last_name='Client', email='[email protected]', is_staff=False, is_active=True, | ||
date_joined=datetime.datetime(2006, 12, 17, 7, 3, 31) | ||
|
@@ -242,7 +242,7 @@ def test_bug_19133(self): | |
form = UserChangeForm(instance=user, data=post_data) | ||
|
||
self.assertTrue(form.is_valid()) | ||
self.assertEqual(form.cleaned_data['password'], 'sha1$6efc0$f93efe9fd7542f25a7be94871ea45aa95de57161') | ||
self.assertEqual(form.cleaned_data['password'], 'pbkdf2_sha256$600000$U3$rhq9d758wGq/JU5/+bkG8OqDVY05d04zKD4cuamR+Sk=') | ||
|
||
def test_bug_19349_bound_password_field(self): | ||
user = User.objects.get(username='testclient') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters