def test_setPriority_invalid1(self): priority = "blah" rule = OpenFlowRule() try: rule.setPriority(priority) except TypeError: pass else: self.fail("did not see error") priority = -1 try: rule.setPriority(priority) except ValueError: pass else: self.fail("did not see error")
def test_setPriority_valid(self): priority = 100 rule = OpenFlowRule() rule.setPriority(priority)