I am using tavern
as a test framework for my python project. The mock server for the test is defined in a yaml file:
test_name: Test phonebook service
stages:
-name: Make sure we can create new contact
request:
url: http://localhost:9301/v2/contact
method: POST
response:
status_code: 200
body:
id: 1
When I run the test I get this error:
/Users/joey/.pyenv/versions/3.7.2/lib/python3.7/site-packages/yaml/scanner.py:579: in fetch_value
self.get_mark())
E yaml.scanner.ScannerError: mapping values are not allowed here
E in "/Users/joey/dev/iress/devel/phonebook-service-api/src/api/tavern-tests/test_contact.tavern.yaml", line 5, column 11
The line5 is request:
but I don't know what wrong with that. I don't think it is a tavern
problem while it looks more like yaml
schema validation issue.