python3: Fix traceback while running tests

While running the testsuite with python3 results in the folowing
traceback:

RuntimeError: dictionary changed size during iteration

Change-Id: I11b9c1d96469de03494e18d17f10939c7e6fce66
Signed-off-by: Chuck Short <chuck.short@canonical.com>