Refactor glance/tests/unit/v2/test_registry_client.py

Remove code duplication from module

Partially implements blueprint glance-tests-code-duplication

Change-Id: Idf54d98d0982b7c64696056c87283eb92f1164b5
(cherry picked from commit 55dcb9e7b19c5901a2aa264b27276094f2a2669f)
Merge "Refactor glance/tests/unit/v2/test_registry_client.py" into stable/havana