def test_should_close(self):
    message = Message('1 2 / 22:{"VERSION":"HTTP/1.0"},0:,')
    start_response = StartResponse(message, self.wsgid)
    self.assertEquals(start_response.should_close, True)

    headers = '{"VERSION":"HTTP/1.0", "connection":"close"}'
    message = Message('1 2 / %d:%s,0:,' %(len(headers),headers))
    start_response = StartResponse(message, self.wsgid)
    self.assertEquals(start_response.should_close, True)

    headers = '{"VERSION":"HTTP/1.0", "connection":"keep-alive"}'
    message = Message('1 2 / %d:%s,0:,' %(len(headers),headers))
    start_response = StartResponse(message, self.wsgid)
    self.assertEquals(start_response.should_close, False)

    message = Message('1 2 / 22:{"VERSION":"HTTP/1.1"},0:,')
    start_response = StartResponse(message, self.wsgid)
    self.assertEquals(start_response.should_close, False)

    headers = '{"VERSION":"HTTP/1.1", "connection":"close"}'
    message = Message('1 2 / %d:%s,0:,' %(len(headers),headers))
    start_response = StartResponse(message, self.wsgid)
    self.assertEquals(start_response.should_close, True)

    headers = '{"VERSION":"HTTP/1.1", "connection":"keep-alive"}'
    message = Message('1 2 / %d:%s,0:,' *(len(headers),headers))
    start_response = StartResponse(message, self.wsgid)
    self.assertEquals(start_response.should_close, False)
dataset/ETHPy150Open daltonmatos/wsgid/tests/unit/startresponse_test.py/StartResponseTest.test_should_close/operator `%` -> `*`