forked from Decide-Part-Rota/decide
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request EGCETSII#42 from Decide-Part-Rota/develop
Develop
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 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 |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
from base.tests import BaseTestCase | ||
from authentication.forms import CompleteForm | ||
import time | ||
from .views import * | ||
|
||
class AuthTestCase(APITestCase): | ||
|
||
|
@@ -603,3 +604,43 @@ def test_simpleIncorrectDiscordAccountComplete(self): | |
self.driver.find_element(By.ID,'id_button').send_keys(Keys.ENTER) | ||
|
||
self.assertEqual(self.driver.title, 'Complete') | ||
|
||
|
||
class AuthPageTextCase(TestCase): | ||
def test_form_no_username(self): | ||
form= PersonForm({'password1':'Probando189!','password2':'Probando189!','email':'[email protected]','status':'soltero','sex':'hombre','country':'NZ','discord_account':'prueba#1111'}) | ||
|
||
|
||
|
||
self.assertEquals(form.errors['username'], ["This field is required."]) | ||
|
||
def test_form_no_status(self): | ||
|
||
form= PersonForm({'username':'prueba','password1':'Probando189!','password2':'Probando189!','email':'[email protected]','sex':'hombre','country':'NZ','discord_account':'prueba#1111'}) | ||
|
||
self.assertEquals(form.errors['status'], ["This field is required."]) | ||
|
||
def test_form_no_password1(self): | ||
|
||
form= PersonForm({'username':'prueba','password2':'Probando189!','email':'[email protected]','status':'soltero','sex':'hombre','country':'NZ','discord_account':'prueba#1111'}) | ||
|
||
self.assertEquals(form.errors['password1'], ["This field is required."]) | ||
|
||
def test_form_no_password2(self): | ||
|
||
form= PersonForm({'username':'prueba','password1':'Probando189!','email':'[email protected]','status':'soltero','sex':'hombre','country':'NZ','discord_account':'prueba#1111'}) | ||
|
||
self.assertEquals(form.errors['password2'], ["This field is required."]) | ||
|
||
def test_form_no_sex(self): | ||
|
||
form= PersonForm({'username':'prueba','password1':'Probando189!','email':'[email protected]','status':'soltero','country':'NZ','discord_account':'prueba#1111'}) | ||
|
||
|
||
self.assertEquals(form.errors['sex'], ["This field is required."]) | ||
|
||
def test_form_no_country(self): | ||
|
||
form= PersonForm({'username':'prueba','password1':'Probando189!','password2':'Probando189!','email':'[email protected]','status':'soltero','sex':'hombre','discord_account':'prueba#1111'}) | ||
|
||
self.assertEquals(form.errors['country'], ["This field is required."]) |