def METHOD_NAME(module_perms, function_role):
    """Create a filter and assign it some permissions.
    :id: d7d1969a-cb30-4e97-a9a3-3a4aaf608795
    :expectedresults: The created filter has the assigned permissions.
    :BZ: 1401469
    :CaseImportance: Critical
    """
    loc = make_location()
    # Assign filter to created role
    filter_ = make_filter(
        {
            'role-id': function_role['id'],
            'permissions': module_perms,
            'location-ids': loc['id'],
            'override': 1,
        }
    )
    # we expect here only only one location, i.e. first element
    assert filter_['locations'][0] == loc['name']