# Path: notifications_utils/request_helper.py
# class NotifyRequest(Request):
# class ResponseHeaderMiddleware(object):
#     def request_id(self):
#     def trace_id(self):
#     def span_id(self):
#     def parent_span_id(self):
#     def _get_header_value(self, header_name):
#     def __init__(self, app, trace_id_header, span_id_header):
#     def __call__(self, environ, start_response):
#         def rewrite_response_headers(status, headers, exc_info=None):
# def init_app(app):
# def check_proxy_header_before_request():
# def _check_proxy_header_secret(request, secrets, header='X-Custom-Forwarder'):


import pytest
import requests_mock
from flask import Flask
from notifications_utils import request_helper



class FakeService():
    id = "1234"


@pytest.fixture
def app():
    flask_app = Flask(__name__)
    ctx = flask_app.app_context()
    ctx.push()

    yield flask_app

    ctx.pop()


@pytest.fixture
def celery_app(mocker):
    app = Flask(__name__)
    app.config['CELERY'] = {'broker_url': 'foo'}
    app.config['NOTIFY_TRACE_ID_HEADER'] = 'Ex-Notify-Request-Id'
    app.statsd_client = mocker.Mock()

# Path: notifications_utils/request_helper.py
# class NotifyRequest(Request):
# class ResponseHeaderMiddleware(object):
#     def request_id(self):
#     def trace_id(self):
#     def span_id(self):
#     def parent_span_id(self):
#     def _get_header_value(self, header_name):
#     def __init__(self, app, trace_id_header, span_id_header):
#     def __call__(self, environ, start_response):
#         def rewrite_response_headers(status, headers, exc_info=None):
# def init_app(app):
# def check_proxy_header_before_request():
# def _check_proxy_header_secret(request, secrets, header='X-Custom-Forwarder'):


# Path: tests/conftest.py
import pytest
import requests_mock
from flask import Flask
from notifications_utils import request_helper




class FakeService():
    id = "1234"


@pytest.fixture
def app():
    flask_app = Flask(__name__)
    ctx = flask_app.app_context()
    ctx.push()

    yield flask_app

    ctx.pop()


@pytest.fixture
def celery_app(mocker):
    app = Flask(__name__)
    app.config['CELERY'] = {'broker_url': 'foo'}
    app.config['NOTIFY_TRACE_ID_HEADER'] = 'Ex-Notify-Request-Id'
    app.statsd_client = mocker.Mock()

    request_helper.init_app(app)