Fix python code according to pylama errors

This commit is contained in:
Pieprzycki Piotr 2016-12-16 15:47:51 +01:00
parent 9b4d3aec64
commit 5afafa5522
4 changed files with 762 additions and 798 deletions

View File

@ -13,19 +13,8 @@ deploy:
tags: true tags: true
branch: master branch: master
script: script:
- cd test/unit - py.test --cov-report= --cov=napalm_vyos test/
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_arp_table - pylama .
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_bgp_neighbors after_success:
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_environment - coveralls
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_facts - if [ $TRAVIS_TAG ]; then curl -X POST https://readthedocs.org/build/napalm; fi
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_interfaces
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_interfaces_counters
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_interfaces_ip
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_lldp_neighbors
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_lldp_neighbors_detail
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_mac_address_table
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_ntp_stats
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_snmp_information
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_ios_only_bgp_time_conversion
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_ping
- cd ../..

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@ ignore = D203,C901
[pylama:pep8] [pylama:pep8]
max_line_length = 100 max_line_length = 100
[pytest] [tools:pytest]
addopts = --cov=./ -vs addopts = --cov=./ -vs
json_report = report.json json_report = report.json
jsonapi = true jsonapi = true

View File

@ -28,9 +28,9 @@ class TestConfigVyOSDriver(unittest.TestCase, TestConfigNetworkDriver):
cls.vendor = 'vyos' cls.vendor = 'vyos'
cls.port = '2200' cls.port = '2200'
optional_args = {'port': '2200' } optional_args = {'port': '2200'}
cls.device = vyos.VyOSDriver(hostname, username, password, cls.device = vyos.VyOSDriver(hostname, username, password,
timeout=60, optional_args=optional_args) timeout=60, optional_args=optional_args)
cls.device.open() cls.device.open()
cls.device.load_replace_candidate(filename='%s/initial.conf' % cls.vendor) cls.device.load_replace_candidate(filename='%s/initial.conf' % cls.vendor)