Skip to content

Commit

Permalink
Groups - Add missing hasScanFme attribute - Merge #161 from isogeo/gr…
Browse files Browse the repository at this point in the history
…oups
  • Loading branch information
Guts committed Apr 21, 2020
2 parents 04f15ba + c4c1b30 commit acfcba8
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 10 deletions.
33 changes: 29 additions & 4 deletions isogeo_pysdk/models/workgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class Workgroup(object):
"code": str,
"contact": Contact,
"hasCswClient": bool,
"hasScanFme": bool,
"limits": dict,
"keywordsCasing": str,
"metadataLanguage": str,
Expand Down Expand Up @@ -157,6 +158,7 @@ def __init__(
self._code = code
self._contact = Contact
self._hasCswClient = None
self._hasScanFme = None
self._keywordsCasing = None
self._limits = None
self._metadataLanguage = None
Expand All @@ -172,6 +174,8 @@ def __init__(
self.__id = _id
if _modified is not None:
self.__modified = _modified
if _tag is not None:
self.__tag = _tag
if areKeywordsRestricted is not None:
self._areKeywordsRestricted = areKeywordsRestricted
if canCreateLegacyServiceLinks is not None:
Expand All @@ -182,6 +186,8 @@ def __init__(
self._code = code
if hasCswClient is not None:
self._hasCswClient = hasCswClient
if hasScanFme is not None:
self._hasScanFme = hasScanFme
if keywordsCasing is not None:
self._keywordsCasing = keywordsCasing
if limits is not None:
Expand Down Expand Up @@ -336,23 +342,42 @@ def contact(self, contact: Contact):

# hasCswClient
@property
def hasCswClient(self) -> str:
def hasCswClient(self) -> bool:
"""Gets the hasCswClient of this Workgroup.
:return: The hasCswClient of this Workgroup.
:rtype: str
:rtype: bool
"""
return self._hasCswClient

@hasCswClient.setter
def hasCswClient(self, hasCswClient: str):
def hasCswClient(self, hasCswClient: bool):
"""Sets the hasCswClient of this Workgroup.
:param str hasCswClient: The hasCswClient of this Workgroup. Must be one of GROUP_KIND_VALUES
:param bool hasCswClient: The hasCswClient of this Workgroup. Must be one of GROUP_KIND_VALUES
"""

self._hasCswClient = hasCswClient

# hasScanFme
@property
def hasScanFme(self) -> bool:
"""Find out if the group has access to the Scan.
:return: The hasScanFme value of this Workgroup.
:rtype: bool
"""
return self._hasScanFme

@hasScanFme.setter
def hasScanFme(self, hasScanFme: bool):
"""Sets the access of the group to the Scan.
:param bool hasScanFme: The hasScanFme of this Workgroup. Must be one of GROUP_KIND_VALUES
"""

self._hasScanFme = hasScanFme

# keywordsCasing
@property
def keywordsCasing(self) -> str:
Expand Down
13 changes: 7 additions & 6 deletions tests/test_workgroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@

"""Usage from the repo root folder:
```python
# for whole test
python -m unittest tests.test_workgroups
# for specific
python -m unittest tests.test_workgroups.TestWorkgroups.test_workgroups_create_basic
```
.. code-block:: python
# for whole test
python -m unittest tests.test_workgroups
# for specific
python -m unittest tests.test_workgroups.TestWorkgroups.test_workgroups_create_basic
"""

# #############################################################################
Expand Down

0 comments on commit acfcba8

Please sign in to comment.