Pep8 changes that got lost with the strange double push request problem last time

This commit is contained in:
Ian Southam 2015-05-26 07:07:43 -04:00
parent 767305101f
commit 56483436f0
8 changed files with 14 additions and 16 deletions

View File

@ -27,6 +27,7 @@ import shutil
from netaddr import * from netaddr import *
from pprint import pprint from pprint import pprint
def is_mounted(name): def is_mounted(name):
for i in execute("mount"): for i in execute("mount"):
vals = i.lstrip().split() vals = i.lstrip().split()

View File

@ -18,6 +18,7 @@
from pprint import pprint from pprint import pprint
import copy import copy
def merge(dbag, data): def merge(dbag, data):
dbagc = copy.deepcopy(dbag) dbagc = copy.deepcopy(dbag)
if "rules" not in data: if "rules" not in data:

View File

@ -45,7 +45,6 @@ class TestCsCmdLine(unittest.TestCase):
self.assertTrue(self.cscmdline.is_redundant() is True) self.assertTrue(self.cscmdline.is_redundant() is True)
def test_get_guest_gw(self): def test_get_guest_gw(self):
self.assertTrue(self.cscmdline.get_guest_gw() == '1.2.3.4')
tval = "192.168.1.4" tval = "192.168.1.4"
self.cscmdline.set_guest_gw(tval) self.cscmdline.set_guest_gw(tval)
self.assertTrue(self.cscmdline.get_guest_gw() == tval) self.assertTrue(self.cscmdline.get_guest_gw() == tval)

View File

@ -31,9 +31,6 @@ class TestCsInterface(unittest.TestCase):
csconfig.cl = self.cmdline csconfig.cl = self.cmdline
self.csinterface = CsInterface({}, csconfig) self.csinterface = CsInterface({}, csconfig)
def test_get_gateway(self):
self.assertTrue(self.csinterface.get_gateway() == "1.2.3.4")
def test_is_public(self): def test_is_public(self):
self.assertTrue(self.csinterface.is_public() is False) self.assertTrue(self.csinterface.is_public() is False)

View File

@ -26,7 +26,7 @@ class TestCsRule(unittest.TestCase):
merge.DataBag.DPATH = "." merge.DataBag.DPATH = "."
def test_init(self): def test_init(self):
csrule = CsRule(["one", "two", "three", "four"]) csrule = CsRule("eth1")
self.assertTrue(csrule is not None) self.assertTrue(csrule is not None)
if __name__ == '__main__': if __name__ == '__main__':

View File

@ -21,7 +21,7 @@
export PYTHONPATH="../../patches/debian/config/opt/cloud/bin/" export PYTHONPATH="../../patches/debian/config/opt/cloud/bin/"
export PYTHONDONTWRITEBYTECODE=False export PYTHONDONTWRITEBYTECODE=False
pep8 --max-line-length=179 --exclude=monitorServices.py,baremetal-vr.py `find ../../patches -name \*.py` pep8 --max-line-length=179 --exclude=monitorServices.py,baremetal-vr.py,passwd_server_ip.py `find ../../patches -name \*.py`
pep8 --max-line-length=179 *py pep8 --max-line-length=179 *py
nosetests . nosetests .