For tracking: if you record it by running python 3.5, the test can't pass under python 2.7.
The real issue comes from python msrest runtime, that the resource url constructed under 2.7 contains double '/' such as ...resourcegroups/XPLATTESTGEXTENSION9085/providers/Microsoft.Compute//virtualMachines/.... this causes the key not found as the url is used as the key.