def METHOD_NAME(collection_import, freq, kwargs, msg):
    LookupModule = collection_import('plugins.lookup.schedule_rrule').LookupModule()
    with pytest.raises(AnsibleError) as e:
        assert LookupModule.get_rrule(freq, kwargs)
    assert msg in str(e.value)