[test][invalid_database] Build error string the same as jsonschema

This allows to build the error message as expected with both
Python 2 and 3.
1 job for py3_compatibility in 20 minutes and 13 seconds
Status Name Job ID Coverage
  Build
passed build #132825
docker-build

00:20:13

76.0%