def test_build_ulimits_with_dict(self):
    ulimits = build_ulimits({'nofile': {'soft': 10000, 'hard': 20000}, 'nproc': {'soft': 65535, 'hard': 65535}})
    expected = [{'name': 'nofile', 'soft': 10000, 'hard': 20000}, {'name': 'nproc', 'soft': 65535, 'hard': 65535}]
    assert (sort_by_name(ulimits) == sort_by_name(expected))
def test_build_ulimits_with_dict(self):
    ulimits = build_ulimits({'nofile': {'soft': 10000, 'hard': 20000}, 'nproc': {'soft': 65535, 'hard': 65535}})
    expected = [{'name': 'nofile', 'soft': 10000, 'hard': 20000}, {'name': 'nproc', 'soft': 65535, 'hard': 65535}]
    assert (sort_by_name(ulimits) == sort_by_name(expected))