[1.7.x] cater for running tests from another directory than tests - applying existing pattern to newly added test_testcase_ordering as well

Backport of d11e836203 from master