-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Added all the shared logic #2
Conversation
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.
Address my inline comment and then proceed
openwisp_utils/tests/utils.py
Outdated
user_model = get_user_model() | ||
|
||
|
||
class TestAdminMixin(object): |
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.
let's rename it to TestMultitenantAdminMixin
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.
Yeah. Okay
Changes Unknown when pulling 89f55f6 on rohithasrk:testing into ** on openwisp:master**. |
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.
Squash/Fixup the commits and then push to master, regarding the missing tests I will open a new issue because it requires some thought.
tests/test_project/__init__.py
Outdated
@@ -0,0 +1,3 @@ | |||
__dependencies__ = [] |
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.
remove this line
Changes Unknown when pulling d7a6f6a on rohithasrk:testing into ** on openwisp:master**. |
1 similar comment
Changes Unknown when pulling d7a6f6a on rohithasrk:testing into ** on openwisp:master**. |
Changes Unknown when pulling eceb5ec on rohithasrk:testing into ** on openwisp:master**. |
Changes Unknown when pulling d24e486 on rohithasrk:testing into ** on openwisp:master**. |
7ea04e2
to
0082347
Compare
Changes Unknown when pulling 0082347 on rohithasrk:testing into ** on openwisp:master**. |
33c055d
to
c1df183
Compare
Changes Unknown when pulling c1df183 on rohithasrk:testing into ** on openwisp:master**. |
class TestStaticFinders(unittest.TestCase): | ||
def test_dependency_finder(self): | ||
finder = DependencyFinder() | ||
self.assertIsInstance(finder.locations, list) |
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.
change to self.assertIn('django_netjsonconfig', finder.locations[0][1])
and do something similar for DependencyLoader
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.
Okay.
Changes Unknown when pulling 7847944 on rohithasrk:testing into ** on openwisp:master**. |
@rohithasrk yes |
Changes Unknown when pulling 3c8ca0a on rohithasrk:testing into ** on openwisp:master**. |
Added all the shared code as mentioned in #1. All I have to do is write tests now. I can start writing them but I've not figured out writing modular tests yet, i.e., for ex., A test case for
MultitenantAdminMixin
which can be extended.