Remove dependency of test_v1_api on other tests

test_v1_api would fail if run by itself. A config value was
apparently being set by another test so that this test would
pass if run as part of the whole suite but not alone.

Specifically, the missing value was 'backend' in group 'database'.

This patch imports the 'backend' option in base.py which is the
base of test_v1_api.

Change-Id: I37d72398050057def6a378e03c14a9a4eeb55a16
Closes-bug: #1283242
Pass Message object to webob exception

Provide the Message object within Glance exception to webob exception
instead of try to convert it to a string. Because Message objects could
not be converted by str() since they may contain non-ascii characters.

Closes-Bug: #1292782
Related-Id: I352cda57fe119022c59c6c813b5c8053765b2d3c
Change-Id: I22b9123d8b3fe58d7dbd8fcde5a8dd58000e2da4
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Removes use of timeutils.set_time_override

The set_time_override function in timeutils was written as a
helper function to mock utcnow for unittests before 'mock' was
generally used. Now that we have mock and fixture, we no longer
need to use it.

Change-Id: I203f7369943b948e0462becbddcba65b2d1576f0
Partial-Bug: #1266962
Merge "Pass Message object to webob exception"
Return 405 when attempting DELETE on /tasks

We currently return 404 NotFound when attempting to delete a task
by hitting the resource /v2/tasks/{task_id}. However, as this
resource exists and we do not allow DELETE on tasks, the correct
response is 405 MethodNotAllowed.

Implementing as per spec on
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

Fixes bug 1287951

Change-Id: Ia4a969e595b520dbc5f4e9a463d967681465ae6f
Merge "Removes use of timeutils.set_time_override"
Merge "Remove dependency of test_v1_api on other tests"
Merge "Return 405 when attempting DELETE on /tasks"