Fix test_cli.invoke for old PyYAML versions (such as 3.13, in Debian 10).
Old versions of PyYAML serialize dicts using {} instead of 'key: value'; but {} was interpreted by .format(), causing a KeyError.
Fixes debian build [1]
Migrated from D3686 (view on Phabricator)