def test_password_encrypted(self):

        text = 'String for hashed password test'
        password = hashlib.sha1('hashed password'.encode()).hexdigest()
        rsp = self.app.post(
            '/post', {
                'upload': text,
                'password': password,
                'is_encrypted': 'yes',
            }
        )
        assert rsp.status == '200 OK'
        url = urlparse.urlparse(rsp.body)
        rsp = self.app.post(
            '/raw{0}'.format(url.path.decode(),),
            {
                'password': password.encode(),
                'is_encrypted': 'yes',
            }
        )
        assert rsp.status == '200 OK'
        assert rsp.body.decode() == text
Simple paste with an encrypted password, expect a 200 and a match
dataset/ETHPy150Open thekad/pasttle/tests/suites/functional.py/FunctionalTest.test_password_encrypted