• Vincent Pelletier's avatar
    ERP5Catalog.test: Move indexation-content-checking tests to a separate file · 3b781bc8
    Vincent Pelletier authored
    To not receive catalog already tainted by clearing & reindexing.
    
    In turn, this allows testing catalog reference content for equality:
    catalog must be exactly the same before/after an ERP5Site_reindexAll, and
    before/after a hot-reindex. So issubset is not an acceptable method.
    Instead, use assertItemsEqual, and raise max diff size.
    
    Also, tidy code a bit:
    - Avoid clearing catalog only to restrict result set.
    - Improve coding style.
    - Simplify code (single-use variables...).
    - Call assert methods producing more helpful error messages on failure.
    3b781bc8
testVanillaERP5Catalog.py 12.4 KB