diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-03-16 13:44:02 +0900 |
---|---|---|
committer | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-03-16 16:14:20 +0900 |
commit | 0f102be98671abc253e2e73aba15073458c1e444 (patch) | |
tree | 606b1cd73a6b242b0a1f92f7f02d36694e11a1b0 /test/scenario_test/route_reflector_test.py | |
parent | 03ba90ac0dd6ecea6c1e2b24956bcc73962d1ef7 (diff) |
scenario_test: pep8 and pylint improvements
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'test/scenario_test/route_reflector_test.py')
-rw-r--r-- | test/scenario_test/route_reflector_test.py | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/test/scenario_test/route_reflector_test.py b/test/scenario_test/route_reflector_test.py index 462bde33..28845841 100644 --- a/test/scenario_test/route_reflector_test.py +++ b/test/scenario_test/route_reflector_test.py @@ -13,17 +13,22 @@ # See the License for the specific language governing permissions and # limitations under the License. -import unittest -from fabric.api import local -from lib import base -from lib.gobgp import * -from lib.quagga import * +from __future__ import absolute_import + import sys -import os import time +import unittest + +from fabric.api import local import nose + from noseplugin import OptionParser, parser_option -from itertools import combinations + +from lib import base +from lib.base import BGP_FSM_ESTABLISHED +from lib.gobgp import GoBGPContainer +from lib.quagga import QuaggaBGPContainer + def wait_for(f, timeout=120): interval = 1 @@ -58,7 +63,7 @@ class GoBGPTestBase(unittest.TestCase): # advertise a route from q1, q2 for idx, c in enumerate(qs): - route = '10.0.{0}.0/24'.format(idx+1) + route = '10.0.{0}.0/24'.format(idx + 1) c.add_route(route) initial_wait_time = max(ctn.run() for ctn in ctns) @@ -98,7 +103,7 @@ class GoBGPTestBase(unittest.TestCase): return len(routes) == 0 wait_for(f) - + def test_03_check_gobgp_adj_rib_out(self): for q in self.quaggas.itervalues(): paths = [p['nlri']['prefix'] for p in self.gobgp.get_adj_rib_out(q)] @@ -115,6 +120,7 @@ class GoBGPTestBase(unittest.TestCase): else: self.assertFalse(p in paths) + if __name__ == '__main__': output = local("which docker 2>&1 > /dev/null ; echo $?", capture=True) if int(output) is not 0: |