Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(5) | Call(5) | Derive(0) | Import(0)
src/p/r/Products.AutoUserMakerPASPlugin-1.0/Products/AutoUserMakerPASPlugin/tests/test_plugin.py Products.AutoUserMakerPASPlugin(Download)
def test_authentication(self): auth = self.plugin.authenticateCredentials self.assertFalse(auth({})) self.assertEqual(auth({'user_id': 'foobar'}), ('foobar', 'foobar'))
self.assertFalse(response.url) self.plugin.challenge(request, response) self.assertEqual(response.url, 'https://www.example.org/') def test_loginurl(self): self.assertEqual( self.plugin.loginUrl('http://www.example.org/path?q=hello+world'), 'https://www.example.org/path?q=hello+world') self.assertEqual( self.plugin.loginUrl('https://www.example.org/https/stays'), '')
self.plugin.loginUrl('https://www.example.org/https/stays'), '') self.assertEqual( self.plugin.loginUrl('ftp://ftp.example.org/path'), '')