def test_user_form_passwords_match(self): form = UserForm({'name' : 'jj', 'email': '*****@*****.**', 'password' : '1234', 'ver_password' : '1234', 'last_4_digits' : '3333', 'stripe_token': '1'}) self.assertTrue(form.is_valid()) #this will throw an error if it doesn't clean correctly self.assertIsNotNone(form.clean())
def test_user_form_passwords_match(self): form=UserForm( { 'name':'jj', 'email':'*****@*****.**', 'password':'******', 'ver_password':'******', 'last_4_digits':'3333', 'stripe_token':'1' } ) # Is the data valid? -- if not print out the errors self.assertTrue(form.is_valid(),form.errors) #this will throw an error if the form doesn't clean correctly self.assertIsNotNone(form.clean())
def test_user_form_passwords_match(self): form = UserForm( { 'name': 'jj', 'email': '*****@*****.**', 'password': '******', 'ver_password': '******', 'last_4_digits': '3333', 'stripe_token': '1' }) self.assertTrue(form.is_valid(), form.errors) self.assertIsNotNone(form.clean())
def test_user_form_passwords_match(self): form = UserForm({ 'name': 'jj', 'email': '*****@*****.**', 'password': '******', 'ver_password': '******', 'last_4_digits': '3333', 'stripe_token': '1' }) self.assertTrue(form.is_valid()) #this will throw an error if it doesn't clean correctly self.assertIsNotNone(form.clean())
def test_user_form_passwords_match(self): form = UserForm({ 'name': 'jjj', 'email': '*****@*****.**', 'password': '******', 'ver_password': '******', 'last_4_digits': '3333', 'stripe_token': '1' }) # Is the data valid? -- if not print out the errors self.assertTrue(form.is_valid(), form.errors) # This will throw an error if the form doesn't clean correctly self.assertIsNotNone(form.clean())
def test_user_form_passwords_match(self): form = UserForm( { "name": "jj", "email": "*****@*****.**", "password": "******", "ver_password": "******", "last_4_digits": "3333", "stripe_token": "1", "sub_type": "yearly", } ) self.assertTrue(form.is_valid()) # this will throw an error if it doesn't clean correctly self.assertIsNotNone(form.clean())
def test_user_form_passwords_match(self): form = UserForm( { 'name': 'Carlos', 'email':'*****@*****.**', 'password':'******', 'ver_password':'******', 'last_4_digits':'2323', 'stripe_token':'1' } ) # is the data valid? self.assertTrue(form.is_valid()) # this will throw an error if the form doesn't clean correctly self.assertIsNotNone(form.clean())
def test_user_form_passwords_match(self): form = UserForm( { 'name': 'jj', 'email': '*****@*****.**', 'password': '******', 'ver_password': '******', 'last_4_digits': '3333', 'stripe_token': '1' } ) # Check if data is valid, otherwise print errors self.assertTrue(form.is_valid(), form.errors) # throw error if data is not cleaned correctly self.assertIsNotNone(form.clean())