Skip to content
Open
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [3.0.5] - 2025-03-10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase from the default branch. This tag is already taken 😬


### Fixed

- fix for [issue 41](https://github.com/smartsheet/smartsheet-python-sdk/issues/41) Deactivated users have status None

## [3.0.4] - 2024-07-29

### Changed
Expand Down
1 change: 1 addition & 0 deletions smartsheet/models/enums/user_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ class UserStatus(Enum):
ACTIVE = 1
PENDING = 2
DECLINED = 3
DEACTIVATED = 4
34 changes: 34 additions & 0 deletions tests/integration/test_model_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2043,6 +2043,40 @@ def test_user_profile(self, smart_setup):
as_dict = model.to_dict()
assert isinstance(as_dict, dict)

def test_deactivated_user(self, smart_setup):
smart = smart_setup['smart']
model = smart.models.UserProfile({
'account': smart.models.Account(),
'admin': True,
'email': 'foo',
'firstName': 'foo',
'groupAdmin': True,
'id': 19082,
'lastName': 'foo',
'licensedSheetCreator': True,
'locale': 'foo',
'resourceViewer': True,
'status': 'DEACTIVATED',
'timeZone': 'foo'
})

assert isinstance(model.account, smart.models.Account)
assert model.admin == True
assert model.email == 'foo'
assert model.first_name == 'foo'
assert model.group_admin == True
assert model.id == 19082
assert model.last_name == 'foo'
assert model.licensed_sheet_creator == True
assert model.locale == 'foo'
assert model.resource_viewer == True
assert model.status == 'DEACTIVATED'
assert model.time_zone == 'foo'
model.account = {}
assert isinstance(model.account, smart.models.Account)
as_dict = model.to_dict()
assert isinstance(as_dict, dict)

def test_user_profile_snake(self, smart_setup):
smart = smart_setup['smart']
model = smart.models.UserProfile({
Expand Down
Loading