Ejemplo n.º 1
0
    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")
Ejemplo n.º 2
0
 def test_setCookie_valid(self):
     cookie = 1234
     rule = OpenFlowRule()
     rule.setCookie(cookie)