Skip to content

Commit

Permalink
fix pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
tdameros committed Mar 19, 2024
1 parent 912b1bf commit af33261
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions user_management/src/user/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ def run_signup_test(self, name, username, email, password, expected_status,
if expected_errors:
self.assertEqual(result.json()['errors'], expected_errors)


def test_signup_valid_username(self, mock_user_stats):

def test_signup_valid_username(self):
password = 'Validpass42*'
expected_status = 201
name = 'Valid Username'
Expand All @@ -59,7 +57,6 @@ def test_signup_valid_username(self, mock_user_stats):
expected_status,
)


def test_signup_invalid_username(self):
password = 'Validpass42*'
expected_status = 400
Expand All @@ -83,7 +80,6 @@ def test_signup_invalid_username(self):
expected_status,
expected_errors)


def test_signup_valid_email(self):
password = 'Validpass42*'
expected_status = 201
Expand All @@ -98,7 +94,6 @@ def test_signup_valid_email(self):
username = 'Aurel' + str(random.randint(0, 100000)) # To avoid `username already taken` error
self.run_signup_test(name, username, email, password, expected_status)


def test_signup_invalid_email(self):
password = 'Validpass42*'
expected_status = 400
Expand Down Expand Up @@ -128,7 +123,6 @@ def test_signup_invalid_email(self):
expected_status,
expected_errors)


def test_signup_valid_password(self):
expected_status = 201
name = 'Valid Password'
Expand All @@ -146,7 +140,6 @@ def test_signup_valid_password(self):
expected_status,
)


def test_signup_invalid_password(self):
expected_status = 400
name = 'Invalid Password'
Expand Down Expand Up @@ -174,7 +167,6 @@ def test_signup_invalid_password(self):
expected_status,
expected_errors)


def test_signup_not_a_json(self):
string = 'This is not a JSON'
url = reverse('signup')
Expand All @@ -185,7 +177,6 @@ def test_signup_not_a_json(self):

class TestsSignin(TestCase):


def test_signin(self):
User.objects.create(
username='aurelien123',
Expand Down Expand Up @@ -219,7 +210,6 @@ def test_signin(self):

class TestsUsernameExist(TestCase):


def test_username_exist(self):
User.objects.create(username='Burel305', email='[email protected]', password='Validpass42*', emailVerified=True)
data_username_exist = {
Expand All @@ -243,7 +233,6 @@ def test_username_exist(self):

class TestsRefreshJWT(TestCase):


def test_refresh_jwt(self):
user = User.objects.create(username='Aurel303',
email='[email protected]',
Expand Down Expand Up @@ -316,7 +305,6 @@ def test_refresh_jwt(self):

class TestsEmailExist(TestCase):


def test_email_exist(self):
User.objects.create(username='Aurel305',
email='[email protected]',
Expand All @@ -343,7 +331,6 @@ def test_email_exist(self):

class UserId(TestCase):


def test_user_id(self):
user = User.objects.create(username='Aurel303',
email='[email protected]',
Expand All @@ -360,7 +347,6 @@ def test_user_id(self):

class Username(TestCase):


def test_username(self):
user = User.objects.create(username='Aurel303',
email='[email protected]',
Expand All @@ -387,7 +373,6 @@ def test_invalid_username(self):

class TestsSearchUsername(TestCase):


def test_search_username(self):
for i in range(1, 20):
User.objects.create(username=f'Felix{i}',
Expand Down Expand Up @@ -445,7 +430,6 @@ class TestsUserUpdateInfos(TestCase):
4) finally, check if the user infos have been updated with /user/user-id
5) test invalid data"""


def test_user_update_infos(self):
# 1)
user = User.objects.create(username='UpdateThisUser',
Expand Down Expand Up @@ -498,7 +482,6 @@ def test_user_update_infos(self):

class TestsTwoFa(TestCase):


def test_two_fa(self):
user = User.objects.create(username='TestTwoFA',
email='[email protected]',
Expand Down

0 comments on commit af33261

Please sign in to comment.