def test_setCookie_invalid1(self): cookie = "blah" rule = OpenFlowRule() try: rule.setCookie(cookie) except TypeError: pass else: self.fail("did not see error") cookie = -1 try: rule.setCookie(cookie) except ValueError: pass else: self.fail("did not see error")
def test_setCookie_valid(self): cookie = 1234 rule = OpenFlowRule() rule.setCookie(cookie)