'Test that TransactionIdmiddleware is executed'

def test_generate_trans_id_with_request(self):

    global context
    app = falcon.API(middleware=TransactionIdMiddleware())
    app.add_route(TEST_ROUTE, MiddlewareClassResource())
    client = testing.TestClient(app)
    response = client.simulate_request(path=TEST_ROUTE)
    assert (_EXPECTED_BODY == response.json)
    assert (response.status == falcon.HTTP_200)
    assert ('transaction_id' in context)
    assert ('unique-req-id' == context['transaction_id'])
