Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

test register user mismatched passwords

    def test_register_user_mismatched_passwords(self):
        response = self.client.post('/auth/register', data={
            'username': 'alice',
            'email': 'alice@example.com',
            'password': 'foo',
            'password2': 'bar',
        })
        assert response.status_code == 200
        html = response.get_data(as_text=True)
        assert 'Field must be equal to password.' in html
Source by blog.miguelgrinberg.com #
 
PREVIOUS NEXT
Tagged: #test #register #user #mismatched #passwords
ADD COMMENT
Topic
Name
3+1 =