If you try to write data without setting a content-type header, there's no content handler and the error message is not very useful:
File "/mnt/share/cdentsrc/nova/.tox/functional/local/lib/python2.7/site-packages/gabbi/suitemaker.py", line 95, in do_test
return test_method(*args, **kwargs)
File "/mnt/share/cdentsrc/nova/.tox/functional/local/lib/python2.7/site-packages/gabbi/case.py", line 94, in wrapper
func(self)
File "/mnt/share/cdentsrc/nova/.tox/functional/local/lib/python2.7/site-packages/gabbi/case.py", line 148, in test_request
self._run_test()
File "/mnt/share/cdentsrc/nova/.tox/functional/local/lib/python2.7/site-packages/gabbi/case.py", line 524, in _run_test
utils.extract_content_type(headers, default='')[0])
File "/mnt/share/cdentsrc/nova/.tox/functional/local/lib/python2.7/site-packages/gabbi/case.py", line 587, in _test_data_to_string
'unable to process data to %s' % content_type)
ValueError: unable to process data to
If content_type is None, we should provide a different message.
If you try to write
data
without setting a content-type header, there's no content handler and the error message is not very useful:If content_type is None, we should provide a different message.