# Path: vpcrouter/main/http_server.py
# def log_to_logger(fn):
#     def _log_to_logger(*args, **kwargs):
#     def __init__(self, *args, **kwargs):
#     def run(self, handler):
#                 def log_request(*args, **kw):
#     def stop(self):
# def handle_request(path):
# def handle_root_request():
# def handle_ips_request():
# def handle_plugins_request():
# def handle_route_info_request():
# def handle_route_vpc_request():
#     def __init__(self, conf):
#     def start(self):
#     def stop(self):
# APP = bottle.Bottle()
# class MyWSGIRefServer(bottle.ServerAdapter):
#             class QuietHandler(WSGIRequestHandler):
# class VpcRouterHttpServer(object):


import json
import requests
import unittest
from vpcrouter.main import http_server
Copyright 2017 Pani Networks Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

"""

#
# Unit tests for the built-in http server module
#




class TestHttpServer(unittest.TestCase):

    def setUp(self):
        self.conf   = {
            "port" : 33445,
            "addr" : "127.0.0.1"
        }

# Path: vpcrouter/main/http_server.py
# def log_to_logger(fn):
#     def _log_to_logger(*args, **kwargs):
#     def __init__(self, *args, **kwargs):
#     def run(self, handler):
#                 def log_request(*args, **kw):
#     def stop(self):
# def handle_request(path):
# def handle_root_request():
# def handle_ips_request():
# def handle_plugins_request():
# def handle_route_info_request():
# def handle_route_vpc_request():
#     def __init__(self, conf):
#     def start(self):
#     def stop(self):
# APP = bottle.Bottle()
# class MyWSGIRefServer(bottle.ServerAdapter):
#             class QuietHandler(WSGIRequestHandler):
# class VpcRouterHttpServer(object):


# Path: vpcrouter/tests/test_http_server.py
import json
import requests
import unittest
from vpcrouter.main import http_server

Copyright 2017 Pani Networks Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

"""

#
# Unit tests for the built-in http server module
#




class TestHttpServer(unittest.TestCase):

    def setUp(self):
        self.conf   = {
            "port" : 33445,
            "addr" : "127.0.0.1"
        }

        self.server = http_server.VpcRouterHttpServer(self.conf)