<s> """<STR_LIT>""" <EOL> from twisted . trial . unittest import TestCase <EOL> from imaginary . test . commandutils import CommandTestCaseMixin , E <EOL> from imaginary . objects import Thing , Container <EOL> from examplegame . glass import GlassBox <EOL> class GlassBoxTests ( CommandTestCaseMixin , TestCase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> """<STR_LIT>""" <EOL> CommandTestCaseMixin . setUp ( self ) <EOL> self . box = Thing ( store = self . store , name = u'<STR_LIT>' , <EOL> description = u'<STR_LIT>' ) <EOL> self . ball = Thing ( store = self . store , name = u'<STR_LIT>' , <EOL> description = u'<STR_LIT>' ) <EOL> self . container = Container . createFor ( self . box ) <EOL> GlassBox . createFor ( self . box ) <EOL> self . ball . moveTo ( self . box ) <EOL> self . box . moveTo ( self . location ) <EOL> self . container . closed = True <EOL> def test_lookThrough ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertCommandOutput ( <EOL> "<STR_LIT>" , <EOL> [ E ( "<STR_LIT>" ) , <EOL> "<STR_LIT>" ] ) <EOL> def test_lookAt ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertCommandOutput ( <EOL> "<STR_LIT>" , <EOL> [ E ( "<STR_LIT>" ) , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" ] ) <EOL> def test_take ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertCommandOutput ( <EOL> "<STR_LIT>" , <EOL> [ "<STR_LIT>" ] ) <EOL> def test_openTake ( self ) : <EOL> """<STR_LIT>""" <EOL> self . container . closed = False <EOL> self . assertCommandOutput ( <EOL> "<STR_LIT>" , <EOL> [ "<STR_LIT>" ] , <EOL> [ "<STR_LIT>" ] ) <EOL> def test_put ( self ) : <EOL> """<STR_LIT>""" <EOL> self . container . closed = False <EOL> self . ball . moveTo ( self . location ) <EOL> self . container . closed = True <EOL> self . assertCommandOutput ( <EOL> "<STR_LIT>" , <EOL> [ "<STR_LIT>" ] ) <EOL> def test_whyNot ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertCommandOutput ( <EOL> "<STR_LIT>" , <EOL> [ "<STR_LIT>" ] ) </s>
