

def test_trans_id_header_fail(self):
    self.assertEqual(self.logger.txn_id, None)

    def start_response(status, headers, exc_info=None):
        self.assertTrue(('X-Trans-Id' in (x[0] for x in headers)))
    app = catch_errors.CatchErrorMiddleware(FakeApp(True), {
        
    })
    req = Request.blank('/v1/a/c/o')
    req(req.environ, start_response)
    self.assertEqual(len(self.logger.txn_id), 34)

dataset/ETHPy150Open openstack/swift/test/unit/common/middleware/test_except.py TestCatchErrors.test_trans_id_header_fail/VarMisuse@85/117 `app`->`req`