def METHOD_NAME(collection_import, freq, kwargs, expect):
    LookupModule = collection_import('plugins.lookup.schedule_rrule').LookupModule()
    generated_rule = LookupModule.get_rrule(freq, kwargs)
    assert generated_rule == expect
    rrule_checker = SchedulePreviewSerializer()
    # Try to run our generated rrule through the awx validator
    # This will raise its own exception on failure
    rrule_checker.validate_rrule(generated_rule)