'Launched server serves with HTTP 1.1.'

def test_protocol(self):

    with captured_stdout() as debug_output:
        conn = HTTPConnection(LiveServerViews.server_thread.host, LiveServerViews.server_thread.port)
        try:
            conn.set_debuglevel(1)
            conn.request('GET', '/example_view/', headers={'Connection': 'keep-alive'})
            conn.getresponse().read()
            conn.request('GET', '/example_view/', headers={'Connection': 'close'})
            conn.getresponse()
        finally:
            conn.close()
    self.assertEqual(debug_output.getvalue().count("reply:    'HTTP/1.1    200    OK"), 2)
