Improve image unittest framework of the OSC

Registered by xiexs

The current unittest framework about image mainly has two drawbacks, hardcode for the faking image and only one faking image can be faked. So, this BP attempts to improve this test framework with two steps:
1. add FakeImage, and then with it user can generate more than faking image and all image info is generated by random.
2. add multi-image testcases (e.g. TestImageDelete) and refactor the legacy unit tests about image with new framework.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
xiexs
Direction:
Needs approval
Assignee:
xiexs
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/improve-image-unittest-framework,n,z

Addressed by: https://review.openstack.org/248565
    Introduce FakeImage class

Gerrit topic: https://review.openstack.org/#q,topic:bp/improve-volume-unittest-framework,n,z

Addressed by: https://review.openstack.org/253985
    Use FakeImage in server test cases.

Addressed by: https://review.openstack.org/254147
    Add "properties" into FakeImage class

Addressed by: https://review.openstack.org/254148
    Refactor TestImageDelete with FakeImage

Addressed by: https://review.openstack.org/254149
    Add multi deletion testcase for "openstack image delete"

Addressed by: https://review.openstack.org/254150
    Refactor TestImageCreate with FakeImage class

Addressed by: https://review.openstack.org/254151
    Refactor TestAddProjectToImage with FakeImage class

Addressed by: https://review.openstack.org/254152
    Refactor TestImageList with FakeImage class

Addressed by: https://review.openstack.org/254153
    Refactor TestRemoveProjectImage with FakeImage class

Addressed by: https://review.openstack.org/316340
    Refactor TestAddProjectToImage with FakeImage class

Addressed by: https://review.openstack.org/316349
    Refactor TestImageList with FakeImage class

Addressed by: https://review.openstack.org/316573
    Refactor TestRemoveProjectImage with FakeImage class

Addressed by: https://review.openstack.org/384178
    Refactor image v1 unit tests with FakeImage class

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.