def test_setTable_invalid1(self): table = "blah" rule = OpenFlowRule() try: rule.setTable(table) except TypeError: pass else: self.fail("did not see error") table = -1 try: rule.setTable(table) except ValueError: pass else: self.fail("did not see error")
def test_setTable_valid(self): table = 1 rule = OpenFlowRule() rule.setTable(table)