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
Bugfix/delete settings meta #2254
Conversation
change from the old uuid to the newer skill_gid fixing the invalid reference to skill_gid.
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.
LGTM... Some optional optimizations.
test/unittests/api/test_api.py
Outdated
| mock_identity = mock.MagicMock() | ||
| mock_identity.is_expired.return_value = False | ||
| mock_identity.uuid = '1234' | ||
| mock_identity_get.return_value = mock_identity |
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.
4 lines —> 1 line: mock_identity_get.return_value = create_identity('1234')
test/unittests/api/test_api.py
Outdated
| mock_identity = mock.MagicMock() | ||
| mock_identity.is_expired.return_value = False | ||
| mock_identity.uuid = '1234' | ||
| mock_identity_get.return_value = mock_identity |
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.
4 lines —> 1 line: mock_identity_get.return_value = create_identity('1234')
test/unittests/api/test_api.py
Outdated
| mock_identity = mock.MagicMock() | ||
| mock_identity.is_expired.return_value = False | ||
| mock_identity.uuid = '1234' | ||
| mock_identity_get.return_value = mock_identity |
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.
4 lines —> 1 line: mock_identity_get.return_value = create_identity('1234')
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.
Good catch, totally missed replacing in the new tests.
- remove duplicated code for creating identity mock - separate the Api class tests from the rest of the tests
c920d6a
to
b68fff3
Compare
Description
Fixes the incorrect variable name reported by @cclauss
This PR also adds a couple of simple unittests for these methods and does a bit of simplification of the api tests.
How to test
Check that the unittests passes.
Contributor license agreement signed?
CLA [ Yes ]