<s> from twisted . trial . unittest import TestCase <EOL> from imaginary . test . commandutils import CommandTestCaseMixin , E <EOL> from imaginary . objects import Thing , Container , Exit <EOL> from imaginary . garments import Garment <EOL> from examplegame . furniture import Chair <EOL> from examplegame . tether import Tether <EOL> class TetherTest ( CommandTestCaseMixin , TestCase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> """<STR_LIT>""" <EOL> CommandTestCaseMixin . setUp ( self ) <EOL> self . ball = Thing ( store = self . store , name = u'<STR_LIT>' ) <EOL> self . ball . moveTo ( self . location ) <EOL> self . tether = Tether . createFor ( self . ball , to = self . location ) <EOL> self . otherPlace = Thing ( store = self . store , name = u'<STR_LIT>' ) <EOL> Container . createFor ( self . otherPlace , capacity = <NUM_LIT:1000> ) <EOL> Exit . link ( self . location , self . otherPlace , u'<STR_LIT>' ) <EOL> def test_takeAndLeave ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertCommandOutput ( <EOL> "<STR_LIT>" , <EOL> [ "<STR_LIT>" ] , <EOL> [ "<STR_LIT>" ] ) <EOL> self . assertCommandOutput ( <EOL> "<STR_LIT>" , <EOL> [ "<STR_LIT>" ] , <EOL> [ "<STR_LIT>" ] ) <EOL> self . assertCommandOutput ( <EOL> "<STR_LIT>" , <EOL> [ "<STR_LIT>" ] , <EOL> [ "<STR_LIT>" ] ) <EOL> self . assertCommandOutput ( <EOL> "<STR_LIT>" , <EOL> [ E ( "<STR_LIT>" ) , <EOL> E ( "<STR_LIT>" ) , <EOL> "<STR_LIT>" ] , <EOL> [ "<STR_LIT>" ] ) <EOL> def test_allTiedUp ( self ) : <EOL> """<STR_LIT>""" <EOL> chairThing = Thing ( store = self . store , name = u'<STR_LIT>' ) <EOL> chairThing . moveTo ( self . location ) <EOL> chair = Chair . createFor ( chairThing ) <EOL> self . assertCommandOutput ( "<STR_LIT>" , <EOL> [ "<STR_LIT>" ] , <EOL> [ "<STR_LIT>" ] ) <EOL> Tether . createFor ( self . player , to = chairThing ) <EOL> self . assertCommandOutput ( <EOL> "<STR_LIT>" , <EOL> [ "<STR_LIT>" ] , <EOL> [ "<STR_LIT>" ] ) <EOL> def test_tetheredClothing ( self ) : <EOL> """<STR_LIT>""" <EOL> Garment . createFor ( self . ball , garmentDescription = u"<STR_LIT>" , <EOL> garmentSlots = [ u"<STR_LIT>" ] ) <EOL> self . assertCommandOutput ( <EOL> "<STR_LIT>" , <EOL> [ "<STR_LIT>" ] , <EOL> [ "<STR_LIT>" ] ) <EOL> self . assertCommandOutput ( <EOL> "<STR_LIT>" , <EOL> [ "<STR_LIT>" ] , <EOL> [ "<STR_LIT>" ] ) </s>
