-
Notifications
You must be signed in to change notification settings - Fork 36
implements missing validations #105
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
Conversation
Can one of the admins verify this patch? |
tests/test_optimizely.py
Outdated
|
||
mock_logger.assert_called_once_with(enums.LogLevels.ERROR, enums.Errors.NONE_USER_ID_PARAMETER) | ||
mock_logger.assert_called_with(enums.LogLevels.ERROR, enums.Errors.INVALID_USER_ID_ERROR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check only asserts the last call and not both calls. What you can do is assertFalse
and check log message and then again do the same thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you have taken a similar approach below.
tests/test_optimizely.py
Outdated
self.optimizely.track('test_event', None, event_tags=4200) | ||
|
||
mock_logging.assert_called_with(enums.LogLevels.ERROR, enums.Errors.INVALID_USER_ID_ERROR) | ||
self.assertEqual(2, mock_logging.call_count) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar comment as above.
tests/test_optimizely.py
Outdated
self.optimizely.get_variation('test_experiment', None, attributes={'test_attribute': 'test_value'}) | ||
|
||
mock_logging.assert_called_with(enums.LogLevels.ERROR, enums.Errors.INVALID_USER_ID_ERROR) | ||
self.assertEqual(2, mock_logging.call_count) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar comment as above.
Closing this PR as most of the APIs params validation have been addressed in #119 |
No description provided.