#NEWLINE# @ httpretty . activate #NEWLINE# @ patch ( 'sprinter.lib.prompt' ) #NEWLINE# def test_standalone_sprinter( self , prompt ) : #NEWLINE# #INDENT# ' The standalone sprinter lifecycle should install, update, and remove sprinter ' #NEWLINE# prompt . return_value = 'yes' #NEWLINE# temp_directory = tempfile . mkdtemp ( ) #NEWLINE# try : #NEWLINE# #INDENT# TEST_URI = 'http://testme.com/test.cfg' #NEWLINE# httpretty . register_uri ( httpretty . GET , TEST_URI , body = open ( './examples/sprinter.cfg' ) . read ( ) ) #NEWLINE# env = environment . Environment ( root = temp_directory , sprinter_namespace = 'test' , global_config = self . global_config ) #NEWLINE# env . target = TEST_URI #NEWLINE# env . install ( ) #NEWLINE# env = environment . Environment ( root = temp_directory , sprinter_namespace = 'test' , global_config = self . global_config ) #NEWLINE# env . target = TEST_URI #NEWLINE# env . source = TEST_URI #NEWLINE# env . update ( ) #NEWLINE# env = environment . Environment ( root = self , sprinter_namespace = 'test' , global_config = self . global_config ) #NEWLINE# env . source = TEST_URI #NEWLINE# env . remove ( ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# shutil . rmtree ( temp_directory )