<s> """<STR_LIT>""" <EOL> import requests <EOL> import json <EOL> import os . path <EOL> endpoint_url = '<STR_LIT>' <EOL> headers = { '<STR_LIT:Content-Type>' : '<STR_LIT:application/json>' } <EOL> def get_sample_json ( jsonfile ) : <EOL> """<STR_LIT>""" <EOL> json_dataset = None <EOL> with open ( <EOL> os . path . join ( <EOL> '<STR_LIT:..>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT:data>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> jsonfile <EOL> ) , <EOL> '<STR_LIT:r>' <EOL> ) as json_file : <EOL> json_dataset = json . load ( json_file ) <EOL> return json . dumps ( json_dataset ) <EOL> def check_data_new ( ) : <EOL> """<STR_LIT>""" <EOL> assert requests . post ( <EOL> endpoint_url , <EOL> headers = headers , <EOL> data = get_sample_json ( '<STR_LIT>' ) <EOL> ) <EOL> def check_data_append ( ) : <EOL> """<STR_LIT>""" <EOL> assert requests . post ( <EOL> endpoint_url , <EOL> headers = headers , <EOL> data = get_sample_json ( '<STR_LIT>' ) <EOL> ) <EOL> def check_model_generate ( ) : <EOL> """<STR_LIT>""" <EOL> assert requests . post ( <EOL> endpoint_url , <EOL> headers = headers , <EOL> data = get_sample_json ( '<STR_LIT>' ) <EOL> ) <EOL> def check_model_predict ( ) : <EOL> """<STR_LIT>""" <EOL> assert requests . post ( <EOL> endpoint_url , <EOL> headers = headers , <EOL> data = get_sample_json ( '<STR_LIT>' ) <EOL> ) </s>
