-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add unit tests for coriolisclient main modules #89
Conversation
b3c5cc1
to
aa80769
Compare
coriolisclient/base.py
Outdated
@@ -135,9 +135,6 @@ def get(self): | |||
def __eq__(self, other): | |||
if not isinstance(other, Resource): | |||
return NotImplemented | |||
# two resources of different types are not equal | |||
if not isinstance(other, self.__class__): | |||
return False |
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.
Please add this code back. This equality is important when comparing resources of different types. (ex. Replica and Migration, these will not be equal, even if their info are the same).
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.
Also, please add this case when testing this method.
1d9cc4f
to
a930963
Compare
coriolisclient/tests/test_base.py
Outdated
@@ -3,17 +3,487 @@ | |||
|
|||
"""Defines base class for all tests.""" | |||
|
|||
from oslotest import base | |||
from oslotest import mock_fixture |
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.
Please move this import into the group below
a930963
to
7b7d5cf
Compare
This PR adds unit tests for coriolisclient main modules.