Skip to content

Commit

Permalink
Merge pull request EGCETSII#42 from Decide-Part-Rota/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
alfcadmorUS authored Dec 18, 2022
2 parents 62c58b0 + ca834d8 commit da7437a
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions decide/authentication/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from base.tests import BaseTestCase
from authentication.forms import CompleteForm
import time
from .views import *

class AuthTestCase(APITestCase):

Expand Down Expand Up @@ -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."])

0 comments on commit da7437a

Please sign in to comment.