def test_is_rhel8():
    rr = RedhatRelease(context_wrap(REDHAT_RELEASE4))
    rel = RR(None, rr)
    result = IsRhel8(rel)
    assert isinstance(result, IsRhel8)
def test_not_rhel8():
    rr = RedhatRelease(context_wrap(REDHAT_RELEASE2))
    rel = RR(None, rr)
    with pytest.raises(SkipComponent) as e:
        IsRhel8(rel)
    assert "Not RHEL8" in str(e)
def test_uname_is_rhel7():
    uname = Uname(context_wrap(UNAME))
    rr = RedhatRelease(context_wrap(REDHAT_RELEASE3))
    rel = RR(uname, rr)
    result = IsRhel7(rel)
    assert isinstance(result, IsRhel7)