<s> """<STR_LIT>""" <EOL> import unittest <EOL> from xbee . tests . Fake import FakeReadDevice <EOL> class TestFakeReadDevice ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> """<STR_LIT>""" <EOL> self . device = FakeReadDevice ( "<STR_LIT:test>" ) <EOL> def test_read_single_byte ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( self . device . read ( ) , '<STR_LIT:t>' ) <EOL> self . assertEqual ( self . device . read ( ) , '<STR_LIT:e>' ) <EOL> self . assertEqual ( self . device . read ( ) , '<STR_LIT:s>' ) <EOL> self . assertEqual ( self . device . read ( ) , '<STR_LIT:t>' ) <EOL> def test_read_multiple_bytes ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( self . device . read ( <NUM_LIT:3> ) , '<STR_LIT>' ) <EOL> self . assertEqual ( self . device . read ( ) , '<STR_LIT:t>' ) <EOL> def test_read_too_many ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertRaises ( ValueError , self . device . read , <NUM_LIT:5> ) </s>
