#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# 'Run before each test method to initialize test environment.' #NEWLINE# super ( TestCase , self ) . setUp ( ) #NEWLINE# realsleep = time . sleep #NEWLINE# def _nosleep( seconds ) : #NEWLINE# #INDENT# return realsleep ( ( seconds * 0.0001 ) ) #NEWLINE# #UNINDENT# self . sleep_fixture = self . useFixture ( fixtures . MonkeyPatch ( 'time.sleep' , vendor ) ) #NEWLINE# config = tempfile . NamedTemporaryFile ( delete = False ) #NEWLINE# config . write ( bytes ( yaml . dump ( self . CLOUD_CONFIG ) . encode ( 'utf-8' ) ) ) #NEWLINE# config . close ( ) #NEWLINE# vendor = tempfile . NamedTemporaryFile ( delete = False ) #NEWLINE# vendor . write ( b'{}' ) #NEWLINE# vendor . close ( ) #NEWLINE# self . config = occ . OpenStackConfig ( config_files = [ config . name ] , vendor_files = [ vendor . name ] ) #NEWLINE# self . cloud_config = self . config . get_one_cloud ( cloud = '_test_cloud_' ) #NEWLINE# self . cloud = shade . OpenStackCloud ( cloud_config = self . cloud_config , log_inner_exceptions = True )