<s> """<STR_LIT>""" <EOL> import unittest <EOL> import mock <EOL> class BadNonceTest ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> from acme . errors import BadNonce <EOL> self . error = BadNonce ( nonce = "<STR_LIT>" , error = "<STR_LIT:error>" ) <EOL> def test_str ( self ) : <EOL> self . assertEqual ( "<STR_LIT>" , str ( self . error ) ) <EOL> class MissingNonceTest ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> from acme . errors import MissingNonce <EOL> self . response = mock . MagicMock ( headers = { } ) <EOL> self . response . request . method = '<STR_LIT>' <EOL> self . error = MissingNonce ( self . response ) <EOL> def test_str ( self ) : <EOL> self . assertTrue ( "<STR_LIT>" in str ( self . error ) ) <EOL> self . assertTrue ( "<STR_LIT:{}>" in str ( self . error ) ) <EOL> class PollErrorTest ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> from acme . errors import PollError <EOL> self . timeout = PollError ( <EOL> exhausted = set ( [ mock . sentinel . AR ] ) , <EOL> updated = { } ) <EOL> self . invalid = PollError ( exhausted = set ( ) , updated = { <EOL> mock . sentinel . AR : mock . sentinel . AR2 } ) <EOL> def test_timeout ( self ) : <EOL> self . assertTrue ( self . timeout . timeout ) <EOL> self . assertFalse ( self . invalid . timeout ) <EOL> def test_repr ( self ) : <EOL> self . assertEqual ( '<STR_LIT>' <EOL> '<STR_LIT>' % repr ( set ( ) ) , repr ( self . invalid ) ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
