-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
[feature] Description of notification shown in a dialog box #272
[feature] Description of notification shown in a dialog box #272
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.
Good progress @Dhanus3133, see my comments below.
The tests which are failing are for the sample app, an example extension of this module, see: https://github.com/openwisp/openwisp-notifications/blob/master/tests/openwisp2/settings.py#L199-L219.
2605a09
to
db83e71
Compare
4a8f765
to
4d27aa9
Compare
@@ -533,7 +533,7 @@ def test_notification_setting_list_api(self): | |||
self.assertEqual(len(response.data['results']), number_of_settings) | |||
|
|||
with self.subTest('Test "page_size" query'): | |||
page_size = 1 | |||
page_size = 2 |
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 test assumes that only one NotificationSetting to be present in the database which was correct when we only had the "default" notification type. We introduced another notification type, so there will be two NotificationSettings in the DB.
When we set the page_size to 1 in the request, the response would contain only one object per page. Since, there are two objects now in the DB, there will be two pages available for this page size. Thus, the next URL is not empty.
Read the DRF docs on pagination for more details.
Fixes: #254
(Test fails for the new type)