예제 #1
0
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)
예제 #2
0
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)
예제 #3
0
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)
예제 #4
0
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)
예제 #5
0
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)
예제 #6
0
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)