'test that simple removal of a flow works'

def test_remove_matching_entries(self):

    def table():
        t = FlowTable()
        t.add_entry(TableEntry(priority=6, cookie=1, match=ofp_match(dl_src=EthAddr('00:00:00:00:00:01'), nw_src='1.2.3.4'), actions=[ofp_action_output(port=5)]))
        t.add_entry(TableEntry(priority=5, cookie=2, match=ofp_match(dl_src=EthAddr('00:00:00:00:00:02'), nw_src='1.2.3.0/24'), actions=[ofp_action_output(port=6)]))
        t.add_entry(TableEntry(priority=1, cookie=3, match=ofp_match(), actions=[]))
        return t
    for (match, priority, strict, remaining) in ((ofp_match(), 0, False, []), (ofp_match(), 0, True, [1, 2, 3]), (ofp_match(), 1, True, [1, 2]), (ofp_match(nw_src='1.2.3.0/24'), 1, False, [3]), (ofp_match(nw_src='1.2.3.0/24'), 6, True, [1, 2, 3]), (ofp_match(dl_src=EthAddr('00:00:00:00:00:02'), nw_src='1.2.3.0/24'), 5, True, [1, 3])):
        t = table()
        t.remove_matching_entries(match, priority=priority, strict=strict)
        self.assertEqual([e.cookie for e in t._table], remaining)
