#NEWLINE# @ attr ( 'slow' ) #NEWLINE# def test_missing_headers( ) : #NEWLINE# #INDENT# file_owner = 'get_test_user' #NEWLINE# file_id = 0 #NEWLINE# resource = '/apigetfile/{0}/{1}/' . format ( file_owner , file_id ) #NEWLINE# headers = list ( default_headers . keys ( ) ) #NEWLINE# for header in headers : #NEWLINE# #INDENT# hd = copy . copy ( default_headers ) #NEWLINE# del hd [ header ] #NEWLINE# response = requests . get ( ( server + resource ) , headers = hd ) #NEWLINE# if six . PY3 : #NEWLINE# #INDENT# content = json . loads ( response . content . decode ( 'unicode_escape' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# content = json . loads ( response . content ) #NEWLINE# #UNINDENT# print ( response . status_code ) #NEWLINE# print ( content ) #NEWLINE# assert ( response . status_code == 422 )