Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 def test_setMatch_invalid(self):
     match = "blah"
     rule = OpenFlowRule()
     try:
         rule.setMatch(match)
     except TypeError:
         pass
     else:
         self.fail("did not see error")