Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Fixing issue for getting resource by scopeUris param #363

Merged
merged 2 commits into from
Feb 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hpOneView/resources/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def build_query_uri(self, start=0, count=-1, filter='', query='', sort='', view=
fields = "&fields=" + quote(fields)

if scope_uris:
scope_uris = "&scope_uris=" + quote(scope_uris)
scope_uris = "&scopeUris=" + quote(scope_uris)

path = uri if uri else self._uri
self.__validate_resource_uri(path)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/resources/test_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def test_get_all_called_once(self, mock_get):
'&sort=name%3Aascending' \
'&view=%22%7Bview-name%7D%22' \
'&fields=name%2Cowner%2Cmodified' \
'&scope_uris=/rest/scopes/cd237b60-09e2-45c4-829e-082e318a6d2a'.format(resource_uri=self.URI)
'&scopeUris=/rest/scopes/cd237b60-09e2-45c4-829e-082e318a6d2a'.format(resource_uri=self.URI)

self.assertEqual([{'member': 'member'}], result)
mock_get.assert_called_once_with(uri)
Expand Down