#NEWLINE# @ pytest . fixture #NEWLINE# def points( request ) : #NEWLINE# #INDENT# simple_points = _url ( 'simple-app/simple-points' ) #NEWLINE# points = [ { #NEWLINE# #INDENT# 'name' : 'Added Point {0}' . format ( x ) , #NEWLINE# 'date' : datetime . utcnow ( ) . isoformat ( ) , #NEWLINE# 'geometry' : { #NEWLINE# #INDENT# 'type' : 'Point' , #NEWLINE# 'coordinates' : [ ( ( - 10.1 ) * x ) , 33.2 ] , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } for x in range ( 10 ) ] #NEWLINE# assert requests . delete ( simple_points , params = { #NEWLINE# #INDENT# 'delete_all' : True , #NEWLINE# #UNINDENT# } ) . ok #NEWLINE# assert requests . post ( points , data = json . dumps ( points ) ) . ok #NEWLINE# points = requests . get ( simple_points ) #NEWLINE# def teardown( ) : #NEWLINE# #INDENT# assert requests . delete ( simple_points , params = { #NEWLINE# #INDENT# 'delete_all' : True , #NEWLINE# #UNINDENT# } ) . ok #NEWLINE# #UNINDENT# request . addfinalizer ( teardown ) #NEWLINE# return points