Fix test to work with mock 0.8.0

This particular test case used a construct that worked in mock 1.0,
but not in 0.8. Our test-requirements.txt says mock>=0.8.0.

Change-Id: I93ed4b7b5d169572bbed6490cb9b0dd421a3b9e2
Merge "Fix test to work with mock 0.8.0"