Using FakeProject and FakeDomain class in all OSC tests

Registered by aohuanxuan

Since BP:https://blueprints.launchpad.net/python-openstackclient/+spec/refactor-identity-unit-test started and FakeProject has been completed both in identityv2_0 and v3, FakeDomain has been completed in indentityv3. Now we can use FakeProject and FakeDomain classes in other tests in OSC instead of the old identity test data.
For example:
The old test:
        self.projects_mock.get.return_value = fakes.FakeResource(
            None,
            copy.deepcopy(identity_fakes.PROJECT),
            loaded=True,
        )
The new test with FakeProject class:
        self.project = identity_fakes.FakeProject.create_one_project()
        self.projects_mock.get.return_value = self.project

Blueprint information

Status:
Complete
Approver:
Steve Martinelli
Priority:
Low
Drafter:
aohuanxuan
Direction:
Approved
Assignee:
aohuanxuan
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Steve Martinelli
Completed by
Steve Martinelli

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/use-fake-project,n,z

Addressed by: https://review.openstack.org/340229
    Use FakeProject and FakeDomain classes in unit tests of networkv2

Addressed by: https://review.openstack.org/347166
    Use identity fake classes instead of old unit tests data

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.