def test_setMatch_valid(self): fields = [ number_field("field", 3, 100, 7), number_field("field", 3, 100, 8) ] match = OpenFlowMatch(fields) rule = OpenFlowRule() rule.setMatch(match)
def test_setMatch_invalid(self): match = "blah" rule = OpenFlowRule() try: rule.setMatch(match) except TypeError: pass else: self.fail("did not see error")