Skip to content
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

[chores] Fixed tests for sample_users #556

Merged
merged 4 commits into from
Oct 5, 2021
Merged

Conversation

pandafy
Copy link
Member

@pandafy pandafy commented Oct 4, 2021

  • Minor changes to CI configuration to ensure correct version
    of Django in the Python environment.

@pandafy pandafy self-assigned this Oct 4, 2021
@pandafy pandafy added this to To do (general) in OpenWISP Contributor's Board via automation Oct 4, 2021
@pandafy pandafy moved this from To do (general) to Needs review in OpenWISP Contributor's Board Oct 4, 2021
- Minor changes to CI configuration to ensure correct version
  of Django in the Python environment.
Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pandafy can you please investigate why the build is failing due to some coverage/coveralls library issue?

@pandafy
Copy link
Member Author

pandafy commented Oct 5, 2021

We are affected by TheKevJames/coveralls-python#326

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After I updated requirements-tests.txt, it looks like executed queries are less than expected.

The pytest-cov lib doesn't cap the coverage version, breaking coveralls.
@nemesifier
Copy link
Member

Unfortunately we need to add an explicit pin to coverage because of pytest-cov. No big deal. But it seems the latest version of openwisp-utils was not being used in tests, because some query tests fail. It seems less queries are executed now, which may be good.

@pandafy
Copy link
Member Author

pandafy commented Oct 5, 2021

The number of queries are going down due to the recent changes done in openwisp-notifications.

@@ -441,6 +441,6 @@ def test_delete_deviceconnection_detail(self):
dc = self._create_device_connection()
d1 = dc.device.id
path = reverse('connection_api:deviceconnection_detail', args=(d1, dc.pk))
with self.assertNumQueries(10):
with self.assertNumQueries(7):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made this change just for the sake of build to pass. We probably have to revert this in #558

@coveralls
Copy link

Coverage Status

Coverage remained the same at 98.725% when pulling 9dba7be on fix-sample-users-test into af4efe9 on master.

OpenWISP Contributor's Board automation moved this from Needs review to In progress Oct 5, 2021
Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The number of queries are going down due to the recent changes done in openwisp-notifications.

Ah ok, thanks for clarifying!

I have made this change just for the sake of build to pass. We probably have to revert this in #558

No problem, let's do it.

@nemesifier nemesifier merged commit 368309d into master Oct 5, 2021
@nemesifier nemesifier deleted the fix-sample-users-test branch October 5, 2021 21:19
OpenWISP Contributor's Board automation moved this from In progress to Done Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants