rcbops/kong — pull request #20 by willkelly (2012-05-10 22:38:22+00:00)
Title: Print copy/pastable curl command on test failures.

======================================================================
FAIL: test_keystone_v2_01_create_tenant (tests.test_keystone_api.TestKeystoneAPI)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/will/Code/rcbops/kong/tests/test_keystone_api.py", line 105, in test_keystone_v2_01_create_tenant
"description": "description"}}, code=201)
File "/home/will/Code/rcbops/kong/lib/resttest/resttest.py", line 23, in wrapped
return f(*args, **kwargs)
File "/home/will/Code/rcbops/kong/lib/resttest/resttest.py", line 127, in _dispatch
return self.request(*args, **kwargs)
File "/home/will/Code/rcbops/kong/lib/resttest/resttest.py", line 100, in request
error=error)
File "/home/will/Code/rcbops/kong/lib/resttest/resttest.py", line 68, in request
loop_p(predicates, response, data, error=error)
File "/home/will/Code/rcbops/kong/lib/resttest/resttest.py", line 46, in loop_p
raise AssertionError(f.error)
AssertionError: Return code of "200" is not "201"
-------------------- >> begin captured stdout << ---------------------
curl -H 'Content-Type: application/json' -H 'X-Auth-Token: 575df07f05004722b19b26f2a6fa0738' -d '{"tenant": {"name": "kongtenant", "description": "description"}}' -X 'POST' 'http://172.28.1.146:35357/v2.0/tenants'
{'content-type': 'application/json',
'date': 'Thu, 10 May 2012 22:35:02 GMT',
'status': '200',
'transfer-encoding': 'chunked',
'vary': 'X-Auth-Token'}
{u'tenant': {u'description': u'description',
u'id': u'342f0f12c4bf418282e533445f0cd160',
u'name': u'kongtenant'}}

--------------------- >> end captured stdout << ----------------------