Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automation_files #660

Merged
merged 10 commits into from
Mar 8, 2021
Prev Previous commit
Next Next commit
modified_testcase
SHANDCRUZ committed Mar 5, 2021

Verified

This commit was signed with the committer’s verified signature.
pradyunsg Pradyun Gedam
commit 59764b83eba4c0011dfcce139a51279d4e6c2324
8 changes: 5 additions & 3 deletions test/test_oneview_id_pools_ipv4_range_facts.py
Original file line number Diff line number Diff line change
@@ -99,7 +99,7 @@
@pytest.mark.resource(TestIdPoolsIpv4RangeFactsModule='id_pools_ipv4_ranges')
class TestIdPoolsIpv4RangeFactsModule(OneViewBaseTest):
def test_should_get_all_id_pools_ipv4_ranges(self):
self.mock_ov_client.id_pools_ipv4_subnets.get_all.return_value = ALL_SUBNETS
self.mock_ov_client.id_pools_ipv4_subnets.get.return_value = ALL_SUBNETS
range_1 = DEFAULT_RANGE_TEMPLATE.copy()
range_2 = DEFAULT_RANGE_TEMPLATE.copy()
range_3 = DEFAULT_RANGE_TEMPLATE.copy()
@@ -134,7 +134,9 @@ def test_should_get_all_id_pools_ipv4_ranges_from_subnet(self):
)

def test_should_get_id_pools_ipv4_range_from_subnet_and_name(self):
self.mock_ov_client.id_pools_ipv4_subnets.get.return_value = DEFAULT_SUBNET_TEMPLATE_2
obj = mock.Mock()
obj.data = DEFAULT_SUBNET_TEMPLATE_2
self.mock_ov_client.id_pools_ipv4_subnets.get.return_value = obj

range_1 = DEFAULT_RANGE_TEMPLATE.copy()
self.resource.get_by_uri.return_value = self.resource
@@ -150,7 +152,7 @@ def test_should_get_id_pools_ipv4_range_from_subnet_and_name(self):

def test_should_get_id_pools_ipv4_range_from_uri(self):

self.resource.get_by_uri().return_value = self.resource
self.resource.get_by_uri.return_value = self.resource
self.resource.data = DEFAULT_RANGE_TEMPLATE.copy()
self.mock_ansible_module.params = PARAMS_GET_BY_URI