def test_generate_manifest():
    manifest = generate_manifest('dir/symbol', 'dir/params', 'dir/service', 'dir/signature', 'name')
    assert 'Model-Archive-Version' in manifest
    assert manifest['Model-Archive-Description'] == 'name'
    assert 'Model-Server' in manifest
    assert 'Engine' in manifest

    assert manifest['Model'] == {
        'Symbol': 'symbol',
        'Parameters': 'params',
        'Signature': 'signature',
        'Service': 'service',
        'Description': 'name',
        'Model-Name': 'name',
        'Model-Format': 'MXNet-Symbolic'
    }
def test_generate_manifest():
    manifest = generate_manifest('dir/symbol', 'dir/params', 'dir/service',
                                 'dir/signature', 'name')
    assert 'Model-Archive-Version' in manifest
    assert manifest['Model-Archive-Description'] == 'name'
    assert 'Model-Server' in manifest
    assert 'Engine' in manifest

    assert manifest['Model'] == {
        'Symbol': 'symbol',
        'Parameters': 'params',
        'Signature': 'signature',
        'Service': 'service',
        'Description': 'name',
        'Model-Name': 'name',
        'Model-Format': 'MXNet-Symbolic'
    }
def test_generate_manifest_imperative_without_params():
    manifest = generate_manifest(symbol_file=None,
                                 params_file=None,
                                 service_file='dir/service',
                                 signature_file='dir/signature',
                                 model_name='name',
                                 model_type_imperative=True)
    assert 'Model-Archive-Version' in manifest
    assert manifest['Model-Archive-Description'] == 'name'
    assert 'Model-Server' in manifest
    assert 'Engine' in manifest

    assert manifest['Model'] == {
        'Symbol': '',
        'Parameters': '',
        'Signature': 'signature',
        'Service': 'service',
        'Description': 'name',
        'Model-Name': 'name',
        'Model-Format': 'Gluon-Imperative'
    }
def test_generate_manifest():
    manifest = generate_manifest(symbol_file='dir/symbol',
                                 params_file='dir/params',
                                 service_file='dir/service',
                                 signature_file='dir/signature',
                                 model_name='name',
                                 model_type_imperative=False)
    assert 'Model-Archive-Version' in manifest
    assert manifest['Model-Archive-Description'] == 'name'
    assert 'Model-Server' in manifest
    assert 'Engine' in manifest

    assert manifest['Model'] == {
        'Symbol': 'symbol',
        'Parameters': 'params',
        'Signature': 'signature',
        'Service': 'service',
        'Description': 'name',
        'Model-Name': 'name',
        'Model-Format': 'MXNet-Symbolic'
    }