def step_impl(context): data = (("id", res[0]), ) files = { 'file': ('sample.txt', open('sample.txt', 'rb')), 'metadata': ('meta.json', open('meta.json', 'rb')), } check_openfiles_pub(data, files, context)
def step_impl(context): data = (('token', tokens["master"]), ) files = { 'file': ('sample.txt', open('sample.txt', 'rb')), 'metadata': ('meta.json', open('meta.json', 'rb')), } check_openfiles_pub(data, files, context)
def step_impl(context): data = ( ("id", res[0]), ('token', generate_random_chars()), ) files = { 'file': ('sample.txt', open('sample.txt', 'rb')), 'metadata': ('meta.json', open('meta.json', 'rb')), } check_openfiles_pub(data, files, context)
def step_impl(context): data = ( ("id", id_prefix + generate_random_chars() + ".public"), ('token', tokens["master"]), ) files = { 'file': ('sample.txt', open('sample.txt', 'rb')), 'metadata': ('meta.json', open('meta.json', 'rb')), } check_openfiles_pub(data, files, context)
def step_impl(context): data = ( ("id", res[0]), ('token', tokens["master"]), ) files = { 'file': ('sample.txt', open('sample.txt', 'rb')), 'metadata': ('meta.json', open('meta.json', 'rb')), 'fille': ('samplecsv.csv', open('samplecsv.csv', 'rb')), 'fie': ('samplepdf.pdf', open('samplepdf.pdf', 'rb')) } check_openfiles_pub(data, files, context)
def step_impl(context): data = ( ("id", res[0]), ('token', tokens["master"]), ) files = { 'abc': ('samplecsv.csv', open('samplecsv.csv', 'rb')), 'efg': ('samplepdf.pdf', open('samplepdf.pdf', 'rb')), } # This part of code removes the files present in the file-uploads folder that existed previously fil = glob.glob('../api-server/file-uploads/*') for f in fil: os.remove(f) check_openfiles_pub(data, files, context)