<s> """<STR_LIT>""" <EOL> from mock import patch , call , MagicMock <EOL> from braubuddy . tests import BraubuddyTestCase <EOL> from braubuddy . thermometer import auto <EOL> from braubuddy . thermometer import dummy <EOL> from braubuddy . thermometer import ds18b20_gpio <EOL> from braubuddy . thermometer import temper_usb <EOL> class TestAuto ( BraubuddyTestCase ) : <EOL> @ patch ( '<STR_LIT>' ) <EOL> @ patch ( '<STR_LIT>' ) <EOL> def test_dummy_returned_if_no_devices ( self , mk_temperusb , mk_ds18b20 ) : <EOL> """<STR_LIT>""" <EOL> mk_ds18b20 . DS18B20 = MagicMock ( side_effect = Exception ( '<STR_LIT>' ) ) <EOL> mk_temperusb . TemperHandler . return_value . get_devices . return_value = [ ] <EOL> thermometer = auto . AutoThermometer ( ) <EOL> self . assertIsInstance ( thermometer , dummy . DummyThermometer ) </s>
