Fix failing 'get_task' test

- Fix "MismatchError: 'hello' != u'create-vm'" by changing assertEqual to assertIsNotNone)
- Fix "APIException: (OperationalError)  'Lock wait timeout exceeded; try restarting transaction')"
by handling this exception (until it would be totally fixed in mistral)

Change-Id: I440ff74e50d47fd0394eec6da6de304b91266443