Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(2)  |  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'))
 
        request = DummyReq('http://www.example.org/')
        response = DummyResp()
        self.assertFalse(response.url)
        self.plugin.challenge(request, response)
        self.assertEqual(response.url, 'https://www.example.org/')