示例#1
0
 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)
示例#2
0
 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)
示例#3
0
 def test_link_exe(self):
     ent = Entity('c', 'd')
     action = ActionLinkEntities('a', 'b')
     action.execute(ent)
     self.assert_equal([('a', 'b')], ent.links)
示例#4
0
 def test_link_exe(self):
     ent = Entity('c', 'd')
     action = ActionLinkEntities('a', 'b')
     action.execute(ent)
     self.assert_equal([('a', 'b')], ent.links)