コード例 #1
0
ファイル: test_rpc.py プロジェクト: vincentbernat/Kitero
 def setUp(self):
     r = Router.load({'clients': 'eth0'})
     # Start the service
     self.service = Service({}, r)
     time.sleep(0.2)         # Safety
     # Configure app
     configure(app)
コード例 #2
0
ファイル: test_api.py プロジェクト: vincentbernat/Kitero
    def setUp(self):
        r = Router.load(yaml.load("""
clients: eth0
interfaces:
  eth1:
    name: LAN
    description: "My first interface"
    qos:
      - qos1
      - qos2
  eth2:
    name: WAN
    description: "My second interface"
    password: 1234
    qos:
      - qos1
qos:
  qos1:
    name: 100M
    description: "My first QoS"
    bandwidth: 100mbps
    netem: delay 100ms 10ms distribution experimental
  qos2:
    name: 10M
    description: "My second QoS"
    bandwidth: 10mbps
    netem: delay 200ms 10ms
"""))
        self.service = Service({}, r) # helper
        configure(app, dict(web=dict(expire=2)))
        self.app = app.test_client() # web
        time.sleep(0.1)
コード例 #3
0
 def setUp(self):
     r = Router.load({'clients': 'eth0'})
     # Start the service
     self.service = Service({}, r)
     time.sleep(0.2)  # Safety
     # Configure app
     configure(app)