def test_TC_AC_Create_007_bt2(self): # invalid password: length too long, max 20 chars invalid_data = { "username": "******", "password": "******", "email": "*****@*****.**" } form = UserForm(data=invalid_data) self.assertFalse(form.is_valid(), 'password too long')
def test_TC_AC_Create_003_bt1(self): # boundary cases for invalid email: extra char invalid_data = { "username": "******", "password": "******", "email": "test@@test.com" } form = UserForm(data=invalid_data) self.assertFalse(form.is_valid(), 'Email format is wrong')
def test_TC_AC_Create_007_bt1(self): # invalid password: length too short, min 5 chars invalid_data = { "username": "******", "password": "******", "email": "*****@*****.**" } form = UserForm(data=invalid_data) self.assertFalse(form.is_valid(), 'password too short')
def test_TC_AC_Create_006_bt3(self): # boundary case for invalid username: username is too long > 30 chars invalid_data = { "username": "******", "password": "******", "email": "*****@*****.**" } form = UserForm(data=invalid_data) self.assertFalse(form.is_valid(), 'Username is too long')
def test_TC_AC_Create_006_bt4(self): # boundary case for invalid username: contains illegal characters invalid_data = { "username": "******", "password": "******", "email": "*****@*****.**" } form = UserForm(data=invalid_data) self.assertFalse(form.is_valid(), 'illegl characters in username')
def test_TC_AC_Create_006_bt1(self): # boundary case for invalid username: username not filled invalid_data = { "username": None, "password": "******", "email": "*****@*****.**" } form = UserForm(data=invalid_data) self.assertFalse(form.is_valid(), 'No username input')
def test_TC_AC_Create_006_bt2(self): # boundary case for invalid username: username is too short <5 letters invalid_data = { "username": "******", "password": "******", "email": "*****@*****.**" } form = UserForm(data=invalid_data) self.assertFalse(form.is_valid(), 'Username is too short')
def test_TC_AC_Create_003_bt4(self): # boundary cases for invalid email: email is too long invalid_data = { "username": "******", "password": "******", "email": "*****@*****.**" } form = UserForm(data=invalid_data) self.assertFalse(form.is_valid(), 'No Email')
def test_TC_AC_Create_003_bt3(self): # boundary cases for invalid email: missing input invalid_data = { "username": "******", "password": "******", "email": None } form = UserForm(data=invalid_data) self.assertFalse(form.is_valid(), 'No Email')
def test_TC_AC_Create_007_bt4(self): # invalid password: length too short, min 5 chars invalid_data = { "username": "******", "password": "******", "email": "*****@*****.**" } form = UserForm(data=invalid_data) self.assertFalse(form.is_valid(), 'Password has illegal characters')
def test_TC_AC_Create_007_bt3(self): # invalid password: all small letters invalid_data = { "username": "******", "password": "******", "email": "*****@*****.**" } form = UserForm(data=invalid_data) self.assertFalse(form.is_valid(), "need to have Capital letters and Numbers")
def test_C_AC_Create_001(self): # test valid data valid_data = { "username": "******", "password": "******", "email": "*****@*****.**" } form = UserForm(data=valid_data) self.assertTrue(form.is_valid(), 'Form is valid')
def test_TC_AC_Create_006_bt2(self): # boundary case for invalid username: username is too short <5 letters invalid_data = { "username": "******", "password": "******", "email": "*****@*****.**", "phoneNumber": "98765432", "notify_email": True, "notify_sms": False, } form = UserForm(data=invalid_data) self.assertFalse(form.is_valid(), 'Username is too short')
def test_TC_AC_Create_006_bt4(self): # boundary case for invalid username: contains illegal characters invalid_data = { "username": "******", "password": "******", "email": "*****@*****.**", "phoneNumber": "98765432", "notify_email": True, "notify_sms": False, } form = UserForm(data=invalid_data) self.assertFalse(form.is_valid(), 'illegl characters in username')
def test_TC_AC_Create_006_bt1(self): # boundary case for invalid username: username not filled invalid_data = { "username": None, "password": "******", "email": "*****@*****.**", "phoneNumber": "98765432", "notify_email": True, "notify_sms": False, } form = UserForm(data=invalid_data) self.assertFalse(form.is_valid(), 'No username input')
def test_TC_AC_Create_003_bt1(self): # boundary cases for invalid email: extra char invalid_data = { "username": "******", "password": "******", "email": "test@@test.com", "phoneNumber": "98765432", "notify_email": True, "notify_sms": False } form = UserForm(data=invalid_data) self.assertFalse(form.is_valid(), 'Email format is wrong')
def test_TC_AC_Create_003_bt4(self): # boundary cases for invalid email: email is too long invalid_data = { "username": "******", "password": "******", "email": "*****@*****.**", "phoneNumber": "98765432", "notify_email": True, "notify_sms": False, } form = UserForm(data=invalid_data) self.assertFalse(form.is_valid(), 'No Email')
def test_C_AC_Create_001(self): # test valid data valid_data = { "username": "******", "password": "******", "email": "*****@*****.**", "phoneNumber": "98765432", "notify_email": True, "notify_sms": False } form = UserForm(data=valid_data) self.assertTrue(form.is_valid(), 'Form is valid')