Example #1
0
def test_default_common_profile(*_):
    default = GenerateData()
    default.profile_name = 'Default Profile'
    default.template_name = 'Default Template'
    default.tuning_files = ['Default Tuning Files']
    default.tuning_data = {'Tuning Data': 'Default', 'Default': 'Tuning data'}

    common = GenerateData()
    common.profile_name = 'Common Profile'
    common.template_name = 'Common Template'
    common.tuning_files = ['Common Tuning Files']
    common.tuning_data = {'Tuning Data': 'Common', 'Common': 'Tuning data'}

    profile = GenerateData()
    profile.profile_name = 'Profile Profile'
    profile.template_name = 'Profile Template'
    profile.tuning_files = ['Profile Tuning Files']
    profile.tuning_data = {'Tuning Data': 'Profile', 'Profile': 'Tuning data'}

    expected = GenerateData()
    expected.profile_name = profile.profile_name
    expected.template_name = profile.template_name
    expected.tuning_files = [] + common.tuning_files + profile.tuning_files
    expected.tuning_data = {}
    expected.tuning_data.update(common.tuning_data)
    expected.tuning_data.update(profile.tuning_data)

    result = prioritize_generate_data(profile, common, default)

    assert expected == result
def test_default_common_profile(*_):
    default = GenerateData()
    default.profile_name = "Default Profile"
    default.template_name = "Default Template"
    default.tuning_files = ["Default Tuning Files"]
    default.tuning_data = {"Tuning Data": "Default", "Default": "Tuning data"}

    common = GenerateData()
    common.profile_name = "Common Profile"
    common.template_name = "Common Template"
    common.tuning_files = ["Common Tuning Files"]
    common.tuning_data = {"Tuning Data": "Common", "Common": "Tuning data"}

    profile = GenerateData()
    profile.profile_name = "Profile Profile"
    profile.template_name = "Profile Template"
    profile.tuning_files = ["Profile Tuning Files"]
    profile.tuning_data = {"Tuning Data": "Profile", "Profile": "Tuning data"}

    expected = GenerateData()
    expected.profile_name = profile.profile_name
    expected.template_name = profile.template_name
    expected.tuning_files = [] + common.tuning_files + profile.tuning_files
    expected.tuning_data = {}
    expected.tuning_data.update(common.tuning_data)
    expected.tuning_data.update(profile.tuning_data)

    result = prioritize_generate_data(profile, common, default)

    assert expected == result
def test_default(*_):
    default = GenerateData()
    default.profile_name = "Default Profile"
    default.template_name = "Default Template"
    default.tuning_files = ["Default Tuning Files"]
    default.tuning_data = {"Tuning Data": "Default", "Default": "Tuning data"}

    common = GenerateData()
    profile = GenerateData()

    result = prioritize_generate_data(profile, common, default)
    expected = default

    assert expected == result
Example #4
0
def test_default(*_):
    default = GenerateData()
    default.profile_name = 'Default Profile'
    default.template_name = 'Default Template'
    default.tuning_files = ['Default Tuning Files']
    default.tuning_data = {'Tuning Data': 'Default', 'Default': 'Tuning data'}

    common = GenerateData()
    profile = GenerateData()

    result = prioritize_generate_data(profile, common, default)
    expected = default

    assert expected == result
def test_profile(*_):
    default = GenerateData()

    common = GenerateData()

    profile = GenerateData()
    profile.profile_name = "Profile Profile"
    profile.template_name = "Profile Template"
    profile.tuning_files = ["Profile Tuning Files"]
    profile.tuning_data = {"Tuning Data": "Profile", "Profile": "Tuning data"}

    expected = profile

    result = prioritize_generate_data(profile, common, default)

    assert expected == result
def test_common(*_):
    default = GenerateData()

    common = GenerateData()
    common.profile_name = "Common Profile"
    common.template_name = "Common Template"
    common.tuning_files = ["Common Tuning Files"]
    common.tuning_data = {"Tuning Data": "Common", "Common": "Tuning data"}

    profile = GenerateData()

    expected = common

    result = prioritize_generate_data(profile, common, default)

    assert expected == result
Example #7
0
def test_profile(*_):
    default = GenerateData()

    common = GenerateData()

    profile = GenerateData()
    profile.profile_name = 'Profile Profile'
    profile.template_name = 'Profile Template'
    profile.tuning_files = ['Profile Tuning Files']
    profile.tuning_data = {'Tuning Data': 'Profile', 'Profile': 'Tuning data'}

    expected = profile

    result = prioritize_generate_data(profile, common, default)

    assert expected == result
Example #8
0
def test_common(*_):
    default = GenerateData()

    common = GenerateData()
    common.profile_name = 'Common Profile'
    common.template_name = 'Common Template'
    common.tuning_files = ['Common Tuning Files']
    common.tuning_data = {'Tuning Data': 'Common', 'Common': 'Tuning data'}

    profile = GenerateData()

    expected = common

    result = prioritize_generate_data(profile, common, default)

    assert expected == result