def test_list_packages_with_serial(db_request):
    projects = [ProjectFactory.create() for _ in range(10)]
    expected = {}
    for project in projects:
        expected.setdefault(project.name, 0)
        for _ in range(10):
            entry = JournalEntryFactory.create(name=project.name)
            if expected[project.name] > entry.id:
                expected[project.name] = entry.id
    assert xmlrpc.list_packages_with_serial(db_request) == expected
dataset/ETHPy150Open pypa/warehouse/tests/unit/legacy/api/test_xmlrpc.py/test_list_packages_with_serial/swapped operands of `>`