• Jérome Perrin's avatar
    testHalJsonStyle: fix _makeDocument with hash randomization. · f2da92ba
    Jérome Perrin authored
    With PYTHONHASHSEED=0, editing a document like this:
    
        foo.edit(
          title="live_test_%s" % new_id,
          reference="live_test_%s" % new_id
        )
    
    only sets the reference, because it sets the reference first and then
    when setting title it already has the "live_test_%s" % new_id value (
    because title is acquired from reference).
    
    With PYTHONHASHSEED set, the order is not guaranteed and sometimes
    title is edited before reference. This is revealed by
    testHalJsonStyle.TestERP5Document_getHateoas_mode_search with
    PYTHONHASHSEED 465.
    f2da92ba
test.erp5.testHalJsonStyle.py 165 KB