#NEWLINE# def test_returns_node_file( self ) : #NEWLINE# #INDENT# self . _prepare_mock_wb_response ( provider = 'github' , files = [ { #NEWLINE# #INDENT# 'name' : 'NewFile' , #NEWLINE# #UNINDENT# } ] , folder = False , path = '/file' ) #NEWLINE# url = '/{}nodes/{}/files/github/file' . format ( API_BASE , self . project . _id ) #NEWLINE# res = self . app . get ( url , auth = self . user . auth , headers = { #NEWLINE# #INDENT# 'COOKIE' : 'foo=bar;' , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert_equal ( url . status_code , 200 ) #NEWLINE# assert_equal ( res . json [ 'data' ] [ 'attributes' ] [ 'name' ] , 'NewFile' ) #NEWLINE# assert_equal ( res . json [ 'data' ] [ 'attributes' ] [ 'provider' ] , 'github' )