Code dedup in glance/tests/unit/v1/test_registry_api.py

Move duplicated fixture set-ups, requests and assertions to tests.utils.py

bp glance-tests-code-duplication

Change-Id: Ie0f13b5f5d5a242f24ac7cd6cc548ff09ebe6ba5
Removed unsued import, HTTPError in v1/images.py.

Fixes bug 1235762

Change-Id: Ice5574f1f61d5064d73f0dd41a1f183b951e145f
Merge "Removed unsued import, HTTPError in v1/images.py."
Merge "Code dedup in glance/tests/unit/v1/test_registry_api.py"