def test_link_twice_then_unlink(self): ent = Entity('c', 'd') link_action = ActionLinkEntities('a', 'b') link_action.execute(ent) link_action.execute(ent) self.assert_equal([('a', 'b')], ent.links) unlink_action = ActionUnlinkEntities('a', 'b') unlink_action.execute(ent) self.assert_equal([], ent.links)
def test_link_exe(self): ent = Entity('c', 'd') action = ActionLinkEntities('a', 'b') action.execute(ent) self.assert_equal([('a', 'b')], ent.links)