Exemple #1
0
    def test_setTable_invalid1(self):
        table = "blah"
        rule = OpenFlowRule()
        try:
            rule.setTable(table)
        except TypeError:
            pass
        else:
            self.fail("did not see error")

        table = -1
        try:
            rule.setTable(table)
        except ValueError:
            pass
        else:
            self.fail("did not see error")
Exemple #2
0
 def test_setTable_valid(self):
     table = 1
     rule = OpenFlowRule()
     rule.setTable(table)