Skip to content

Commit

Permalink
Remove pyflakes warnings from test_iptc.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
ldx committed Mar 22, 2015
1 parent 072baae commit f782efa
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions iptc/test/test_iptc.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ def test_refresh(self):
def test_flush_user_chains(self):

chain1 = iptc.Chain(iptc.Table(iptc.Table.FILTER),
"iptc_test_flush_chain1")
"iptc_test_flush_chain1")
chain2 = iptc.Chain(iptc.Table(iptc.Table.FILTER),
"iptc_test_flush_chain2")
"iptc_test_flush_chain2")
iptc.Table(iptc.Table.FILTER).create_chain(chain1)
iptc.Table(iptc.Table.FILTER).create_chain(chain2)

Expand Down Expand Up @@ -143,7 +143,8 @@ def test_flush_builtin(self):

iptc.Chain(filter_table, "OUTPUT").append_rule(rule)

self.assertEquals(len(iptc.Chain(filter_table, "OUTPUT").rules), output_rule_count + 1)
self.assertEquals(len(iptc.Chain(filter_table, "OUTPUT").rules),
output_rule_count + 1)

filter_table.flush()

Expand Down Expand Up @@ -581,12 +582,12 @@ def test_rule_address(self):
# valid addresses
rule = iptc.Rule()
for addr in [("127.0.0.1/255.255.255.0", "127.0.0.1/255.255.255.0"),
("!127.0.0.1/255.255.255.0", "!127.0.0.1/255.255.255.0"),
("127.0.0.1/255.255.128.0", "127.0.0.1/255.255.128.0"),
("127.0.0.1/16", "127.0.0.1/255.255.0.0"),
("127.0.0.1/24", "127.0.0.1/255.255.255.0"),
("127.0.0.1/17", "127.0.0.1/255.255.128.0"),
("!127.0.0.1/17", "!127.0.0.1/255.255.128.0")]:
("!127.0.0.1/255.255.255.0", "!127.0.0.1/255.255.255.0"),
("127.0.0.1/255.255.128.0", "127.0.0.1/255.255.128.0"),
("127.0.0.1/16", "127.0.0.1/255.255.0.0"),
("127.0.0.1/24", "127.0.0.1/255.255.255.0"),
("127.0.0.1/17", "127.0.0.1/255.255.128.0"),
("!127.0.0.1/17", "!127.0.0.1/255.255.128.0")]:
rule.src = addr[0]
self.assertEquals(rule.src, addr[1])
rule.dst = addr[0]
Expand Down Expand Up @@ -614,7 +615,6 @@ def test_rule_address(self):
else:
self.fail("rule accepted invalid address %s" % (addr))


def test_rule_interface(self):
# valid interfaces
rule = iptc.Rule()
Expand Down

0 comments on commit f782efa

Please sign in to comment.