Пример #1
0
def test_analysis_profile_name_validation():
    """ Test to validate profile name."""
    p = HostAnalysisProfile(None,
                            fauxfactory.gen_alphanumeric(),
                            files=["asdf", "dfg"])
    with error.expected("Name can't be blank"):
        p.create()
Пример #2
0
def test_analysis_profile_description_validation():
    """ Test to validate profile description."""
    p = HostAnalysisProfile(fauxfactory.gen_alphanumeric(),
                            None,
                            files=["asdf", "dfg"])
    with error.expected("Description can't be blank"):
        p.create()
Пример #3
0
def test_analysis_profile_item_validation():
    """ Test to validate analysis profile items."""
    p = HostAnalysisProfile(fauxfactory.gen_alphanumeric(),
                            fauxfactory.gen_alphanumeric(),
                            files=None)
    with error.expected(
            "At least one item must be entered to create Analysis Profile"):
        p.create()
def test_host_analysis_profile_crud():
    """CRUD for Host analysis profiles."""
    p = HostAnalysisProfile(
        fauxfactory.gen_alphanumeric(), fauxfactory.gen_alphanumeric(), files=["asdf", "dfg"])
    p.create()
    with update(p):
        p.files = ["qwer"]
    p.delete()
def test_host_analysis_profile_crud():
    """CRUD for Host analysis profiles."""
    p = HostAnalysisProfile(
        generate_random_string(), generate_random_string(), files=["asdf", "dfg"])
    p.create()
    with update(p):
        p.files = ["qwer"]
    p.delete()
def test_host_analysis_profile_crud():
    """CRUD for Host analysis profiles."""
    p = HostAnalysisProfile(fauxfactory.gen_alphanumeric(),
                            fauxfactory.gen_alphanumeric(),
                            files=["asdf", "dfg"])
    p.create()
    with update(p):
        p.files = ["qwer"]
    p.delete()
def test_analysis_profile_description_validation():
    """ Test to validate profile description."""
    p = HostAnalysisProfile(fauxfactory.gen_alphanumeric(), None, files=["asdf", "dfg"])
    with error.expected("Description can't be blank"):
        p.create()
def test_analysis_profile_name_validation():
    """ Test to validate profile name."""
    p = HostAnalysisProfile(None, fauxfactory.gen_alphanumeric(), files=["asdf", "dfg"])
    with error.expected("Name can't be blank"):
        p.create()
def test_analysis_profile_item_validation():
    """ Test to validate analysis profile items."""
    p = HostAnalysisProfile(
        fauxfactory.gen_alphanumeric(), fauxfactory.gen_alphanumeric(), files=None)
    with error.expected("At least one item must be entered to create Analysis Profile"):
        p.create()