# Path: gunstar/http.py
# PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
# GUNSTAR_TEMPLATE_PATH = os.path.join(PROJECT_PATH, 'templates')
# class RequestHandler(object):
# class NotFoundHandler(RequestHandler):
# class ErrorHandler(RequestHandler):
#     def __init__(self, app, request, response):
#     def before_dispatch(self):
#     def dispatch(self, *args, **kwargs):
#     def after_dispatch(self):
#     def abort(self, code, message=None):
#     def redirect(self, redirect_url, permanent=False, status_code=302):
#     def get_template_globals(self):
#     def get_template_filters(self):
#     def create_template_env(self):
#     def render_template(self, template_name, **kwargs):
#     def reverse_route(self, name, *args):
#     def get(self):
#     def get(self, exc_info):
# 
# Path: gunstar/signals.py



import unittest
import six
from six.moves import http_cookies
from six.moves.urllib.parse import urlencode
from gunstar.http import Request
from gunstar.signals import template_rendered_signal
    def get_request(self, path, data=None, headers=None, method='GET'):
        if data is None:
            data = {}

        if headers is None:
            headers = {}

        if data:
            path = path + '?' + urlencode(data)

        req = Request.blank(path)
        req.method = method
        req.headers.update(headers)
        self.load_cookies(req)
        resp = req.get_response(self.app)
        self.store_cookies(resp)
        resp.request_started = req
        resp.template = self.template
        resp.context = self.context
        self.template = self.context = None
        return resp

    def post_request(self, path, data=None, headers=None, content_type='',
                     method='POST'):
        if data is None:
            data = {}

        if headers is None:
            headers = {}


# Path: gunstar/http.py
# PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
# GUNSTAR_TEMPLATE_PATH = os.path.join(PROJECT_PATH, 'templates')
# class RequestHandler(object):
# class NotFoundHandler(RequestHandler):
# class ErrorHandler(RequestHandler):
#     def __init__(self, app, request, response):
#     def before_dispatch(self):
#     def dispatch(self, *args, **kwargs):
#     def after_dispatch(self):
#     def abort(self, code, message=None):
#     def redirect(self, redirect_url, permanent=False, status_code=302):
#     def get_template_globals(self):
#     def get_template_filters(self):
#     def create_template_env(self):
#     def render_template(self, template_name, **kwargs):
#     def reverse_route(self, name, *args):
#     def get(self):
#     def get(self, exc_info):
# 
# Path: gunstar/signals.py



# Path: gunstar/testing.py
import unittest
import six
from six.moves import http_cookies
from six.moves.urllib.parse import urlencode
from gunstar.http import Request
from gunstar.signals import template_rendered_signal

    def get_request(self, path, data=None, headers=None, method='GET'):
        if data is None:
            data = {}

        if headers is None:
            headers = {}

        if data:
            path = path + '?' + urlencode(data)

        req = Request.blank(path)
        req.method = method
        req.headers.update(headers)
        self.load_cookies(req)
        resp = req.get_response(self.app)
        self.store_cookies(resp)
        resp.request_started = req
        resp.template = self.template
        resp.context = self.context
        self.template = self.context = None
        return resp

    def post_request(self, path, data=None, headers=None, content_type='',
                     method='POST'):
        if data is None:
            data = {}

        if headers is None:
            headers = {}


        req = Request.blank(path)