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

All Samples(12)  |  Call(12)  |  Derive(0)  |  Import(0)

src/w/e/WebTest-2.0.15/tests/test_app.py   WebTest(Download)
                        'App should initially contain no cookies')
 
        self.assertFalse(app.cookies)
        res = app.get('/')
        self.assertEqual(app.cookies['spam'], 'eggs')
 
        app.reset()
        self.assertFalse(bool(app.cookies))
 
    def test_secure_cookies(self):
        app = webtest.TestApp(cookie_app)
 
        self.assertFalse(app.cookies)
        res = app.get('https://localhost/')
        self.assertEqual(app.cookies['spam'], 'eggs')
        mock_time.return_value = 1461464946.0
        app.get('/')
        self.assertFalse(app.cookies, 'Response should have unset cookies')
 
    def test_http_cookie(self):
 
        res = app.get('/', headers=[('Cookie', 'spam=eggs')])
        self.assertFalse(app.cookies,
                         'Response should not have set cookies')
        self.assertEqual(res.request.environ['HTTP_COOKIE'], 'spam=eggs')

src/e/v/evelink-HEAD/tests/test_api.py   evelink(Download)
 
        # Ensure this is really not called.
        self.assertFalse(mock_urlopen.called)
 
        self.assertEqual(len(result), 3)
            self.api.get, 'foo/Bar', {'a':[1,2,3]})
 
        self.assertFalse(mock_urlopen.called)
        self.assertEqual(self.api.last_timestamps, {
            'current_time': 1255885531,
            client, 1, limit=2, before_kill=3, api_result=results
        )
        self.assertFalse(client.get.called)
 
 

src/w/e/WebTest-2.0.15/tests/test_http.py   WebTest(Download)
    def test_shutdown_non_running(self):
        host, port = http.get_free_port()
        s = http.StopableWSGIServer(debug_app, host=host, port=port)
        self.assertFalse(s.wait(retries=-1))
        self.assertTrue(s.shutdown())

src/e/v/evelink-HEAD/tests/test_requests_api.py   evelink(Download)
        self.assertEqual(rows[0].attrib['foo'], 'bar')
 
        self.assertFalse(self.mock_sessions.post.called)
        # timestamp attempted to be extracted.
        self.assertEqual(self.api.last_timestamps, {
            self.api.get, 'foo/Bar', {'a':[1,2,3]})
 
        self.assertFalse(self.mock_sessions.post.called)
        self.assertEqual(self.api.last_timestamps, {
            'current_time': 1255885531,

src/e/v/evelink-HEAD/tests/parsing/test_contact_list.py   evelink(Download)
        self.assertEqual(result['alliance'], expected_result['alliance'])
        self.assertEqual(result['corp'], expected_result['corp'])
        self.assertFalse('personal' in result)
 
        self.assertEqual(sorted(result.keys()), sorted(expected_result.keys()))