How to use the webtest.http.check_server function in WebTest

To help you get started, we’ve selected a few WebTest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Pylons / webtest / tests / test_http.py View on Github external
def test_server(self):
        s = self.s
        s.wait()
        self.assertEqual(200,
                         http.check_server(s.adj.host, s.adj.port,
                                           '/__application__'))
        self.assertEqual(200,
                         http.check_server(s.adj.host, s.adj.port,
                                           '/__file__?__file__=' + __file__))
        self.assertEqual(404,
                         http.check_server(s.adj.host, s.adj.port,
                                           '/__file__?__file__=XXX'))

        self.assertEqual(304,
                         http.check_server(s.adj.host, s.adj.port,
                                           '/?status=304'))
github Pylons / webtest / tests / test_http.py View on Github external
def test_server(self):
        s = self.s
        s.wait()
        self.assertEqual(200,
                         http.check_server(s.adj.host, s.adj.port,
                                           '/__application__'))
        self.assertEqual(200,
                         http.check_server(s.adj.host, s.adj.port,
                                           '/__file__?__file__=' + __file__))
        self.assertEqual(404,
                         http.check_server(s.adj.host, s.adj.port,
                                           '/__file__?__file__=XXX'))

        self.assertEqual(304,
                         http.check_server(s.adj.host, s.adj.port,
                                           '/?status=304'))
github Pylons / webtest / tests / test_http.py View on Github external
def test_server(self):
        s = self.s
        s.wait()
        self.assertEqual(200,
                         http.check_server(s.adj.host, s.adj.port,
                                           '/__application__'))
        self.assertEqual(200,
                         http.check_server(s.adj.host, s.adj.port,
                                           '/__file__?__file__=' + __file__))
        self.assertEqual(404,
                         http.check_server(s.adj.host, s.adj.port,
                                           '/__file__?__file__=XXX'))

        self.assertEqual(304,
                         http.check_server(s.adj.host, s.adj.port,
                                           '/?status=304'))