#NEWLINE# def test_bulk_create_logged_in( self ) : #NEWLINE# #INDENT# res = self . app . post_json_api ( self . url , { #NEWLINE# #INDENT# 'data' : [ self . collection , self . collection_two ] , #NEWLINE# #UNINDENT# } , auth = self . user_one . auth , bulk = True ) #NEWLINE# assert_equal ( res . status_code , 201 ) #NEWLINE# assert_equal ( len ( res . json [ 'data' ] ) , 2 ) #NEWLINE# assert_equal ( res . json [ 'data' ] [ 0 ] [ 'attributes' ] [ 'title' ] , self . collection [ 'attributes' ] [ 'title' ] ) #NEWLINE# assert_equal ( res . json [ 'data' ] [ 1 ] [ 'attributes' ] [ 'title' ] , self . collection_two [ 'attributes' ] [ 'title' ] ) #NEWLINE# assert_equal ( res . content_type , 'application/vnd.api+json' ) #NEWLINE# res = self . app . get ( self . url , auth = self . user_one . auth ) #NEWLINE# assert_equal ( len ( res . json [ 'data' ] ) , 2 ) #NEWLINE# id_one = res . json [ 'data' ] [ 0 ] [ 'id' ] #NEWLINE# id_two = res . json [ 'data' ] [ 1 ] [ 'id' ] #NEWLINE# res = self . app . delete_json_api ( self . url , { #NEWLINE# #INDENT# 'data' : [ { #NEWLINE# #INDENT# 'id' : id_one , #NEWLINE# 'type' : 'collections' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'id' : id_two , #NEWLINE# 'type' : 'collections' , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } , auth = self . user_one . auth , bulk = True ) #NEWLINE# assert_equal ( res . status_code , 204 )