tests: minor code simplification

Change-Id: I976bbe79327de233edb1b4c448572d23a1e743ac