[extensions-web/feature/custom-user-class-step2: 4/4] */*: a bit more formatting




commit 63e4c51cbc74440c324bd7353a52ff56a1cd7618
Author: Yuri Konotopov <ykonotopov gnome org>
Date:   Sun May 22 17:23:36 2022 +0400

    */*: a bit more formatting

 sweettooth/auth/tests.py       | 7 ++++++-
 sweettooth/extensions/tests.py | 1 +
 2 files changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/sweettooth/auth/tests.py b/sweettooth/auth/tests.py
index a95b29b..251e765 100644
--- a/sweettooth/auth/tests.py
+++ b/sweettooth/auth/tests.py
@@ -20,6 +20,7 @@ from .urls import PASSWORD_RESET_TOKEN_PATTERN
 
 User = get_user_model()
 
+
 class RegistrationDataTest(TestCase):
     registration_data = {
         User.USERNAME_FIELD: 'bob',
@@ -36,17 +37,19 @@ class RegistrationDataTest(TestCase):
     @classmethod
     def setUpClass(cls):
         super().setUpClass()
+
         cls.registered_user = User.objects.create_user(
             username=cls.registration_data[User.USERNAME_FIELD],
             email=cls.registration_data['email'],
             password=cls.registration_data['password']
         )
 
+
 # registration/tests/test_forms.py
 class AuthTests(RegistrationDataTest):
     def test_email_uniqueness(self):
         data = self.valid_data.copy()
-        data.update(email = self.registration_data['email'])
+        data.update(email=self.registration_data['email'])
         form = AutoFocusRegistrationForm(
             data=data
         )
@@ -78,6 +81,7 @@ class AuthTests(RegistrationDataTest):
             username=self.registration_data['email'],
             password=self.valid_data['password1']))
 
+
 class RegistrationTests(RegistrationDataTest):
     def test_username_email(self):
         form = RegistrationForm(data=self.valid_data)
@@ -96,6 +100,7 @@ class RegistrationTests(RegistrationDataTest):
         form = RegistrationForm(data=data)
         self.assertFalse(form.is_valid())
 
+
 class PasswordResetTests(RegistrationDataTest):
     def test_reset_token_pattern(self):
         token = PasswordResetTokenGenerator().make_token(self.registered_user)
diff --git a/sweettooth/extensions/tests.py b/sweettooth/extensions/tests.py
index 309050f..1ccc3cc 100644
--- a/sweettooth/extensions/tests.py
+++ b/sweettooth/extensions/tests.py
@@ -556,6 +556,7 @@ class DownloadExtensionTest(BasicUserTestCase, TestCase):
         self.assertRedirects(self.download(metadata['uuid'], '3.2.1'), v1.source.url)
         self.assertRedirects(self.download(metadata['uuid'], '3.2.2'), v2.source.url)
 
+
 class UpdateVersionTest(TestCase):
     fixtures = [os.path.join(testdata_dir, 'test_upgrade_data.json')]
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]