Avoid masking an assert failure with a KeyError Exception

This patch does not address the underlying issue as to
why the key was not in the data dictionary, but it serves
the purpose of getting a better error message due to the
failure in meeting the pre-conditions to the test.

Change-Id: I507a34456e8d047728bb7c1d1e5d189e3d00e7c1
Related-bug: #1268274
Merge "Avoid masking an assert failure with a KeyError Exception"