Пример #1
0
def test_check_raises():
    with pytest.raises(IgnoreResultsError) as exc:
        list(
            oracle_rman.check_oracle_rman("NON-EXISTANT-ITEM", {},
                                          get_parsed_section()))
    assert "Login into database failed. Working on NON-EXISTANT-ITEM" in str(
        exc.value)
Пример #2
0
def test_check_raises():
    with pytest.raises(IgnoreResultsError) as exc:
        list(
            oracle_rman.check_oracle_rman("NON-EXISTANT-ITEM",
                                          type_defs.Parameters({}),
                                          PARSED_SECTION))
    assert "Login into database failed. Working on NON-EXISTANT-ITEM" in str(
        exc.value)
Пример #3
0
def test_check(item, params, section, results):
    yielded_results = list(oracle_rman.check_oracle_rman(
        item, params, section))
    assert yielded_results == results