Skip to content
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
3 changes: 3 additions & 0 deletions incognia/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ def register_login(self,
policy_id: Optional[str] = None,
device_os: Optional[str] = None,
app_version: Optional[str] = None,
custom_properties: Optional[dict] = None,
person_id: Optional[PersonID] = None) -> dict:

if not request_token:
raise IncogniaError('request_token is required.')
if not account_id:
Expand Down Expand Up @@ -236,6 +238,7 @@ def register_login(self,
'policy_id': policy_id,
'device_os': device_os.lower() if device_os is not None else None,
'app_version': app_version,
'custom_properties': custom_properties,
'person_id': person_id,
}
data = encode(body)
Expand Down
4 changes: 3 additions & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ class TestIncogniaAPI(TestCase):
'policy_id': f'{POLICY_ID}',
'device_os': f'{DEVICE_OS.lower()}',
'app_version': f'{APP_VERSION}',
'person_id': PERSON_ID
'custom_properties': CUSTOM_PROPERTIES,
'person_id': PERSON_ID,
})
REGISTER_VALID_WEB_LOGIN_DATA: Final[bytes] = encode({
'type': 'login',
Expand Down Expand Up @@ -771,6 +772,7 @@ def test_register_login_with_all_fields_should_work(
policy_id=self.POLICY_ID,
device_os=self.DEVICE_OS,
app_version=self.APP_VERSION,
custom_properties=self.CUSTOM_PROPERTIES,
person_id=self.PERSON_ID)

mock_token_manager_get.assert_called()
Expand Down
Loading