Use proper assertions
Merge pull request #5690 from lucasmichot/4.2-tests-same-equal

[4.2] Tests : use proper assertions