<s> try : <EOL> from django . test import override_settings <EOL> except ImportError : <EOL> from django . test . utils import override_settings <EOL> from django . test import TestCase <EOL> from redis . exceptions import ConnectionError <EOL> from tests . testapp . tests . base_tests import SetupMixin <EOL> LOCATION = "<STR_LIT>" <EOL> @ override_settings ( <EOL> CACHES = { <EOL> '<STR_LIT:default>' : { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : LOCATION , <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : <NUM_LIT:15> , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : - <NUM_LIT:1> , <EOL> '<STR_LIT>' : <NUM_LIT:0> , <EOL> } , <EOL> } , <EOL> } <EOL> ) <EOL> class SocketTimeoutTestCase ( SetupMixin , TestCase ) : <EOL> def tearDown ( self ) : <EOL> pass <EOL> def test_socket_timeout ( self ) : <EOL> self . reset_pool ( ) <EOL> cache = self . get_cache ( ) <EOL> with self . assertRaises ( ConnectionError ) : <EOL> cache . set ( '<STR_LIT>' , '<STR_LIT:a>' ) </s>
