-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
1 addition
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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' | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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' | ||
|
@@ -146,7 +140,6 @@ def test_signup_valid_password(self): | |
expected_status, | ||
) | ||
|
||
|
||
def test_signup_invalid_password(self): | ||
expected_status = 400 | ||
name = 'Invalid Password' | ||
|
@@ -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') | ||
|
@@ -185,7 +177,6 @@ def test_signup_not_a_json(self): | |
|
||
class TestsSignin(TestCase): | ||
|
||
|
||
def test_signin(self): | ||
User.objects.create( | ||
username='aurelien123', | ||
|
@@ -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 = { | ||
|
@@ -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]', | ||
|
@@ -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]', | ||
|
@@ -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]', | ||
|
@@ -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]', | ||
|
@@ -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}', | ||
|
@@ -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', | ||
|
@@ -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]', | ||
|