-
Notifications
You must be signed in to change notification settings - Fork 39
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 tests for router sending trap from other ip #2510
Add tests for router sending trap from other ip #2510
Conversation
5fbf4cb
to
d6adb40
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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.
It is clear from the failing tests that this does not work as expected.
Working with legacy database connections is tricky, since you cannot disable the transactional framework in the same way you can when using the Django ORM.
Putting setup/teardown into the test code like this is not a good idea. There is no guarantee that the teardown will actually run - in fact, it is guaranteed that it won't run if the test fails - and then you have left data in the database that will interfere with the remaining tests in the suite.
As a minimum, you should create pytest fixtures for the data you depend on, so you ensure a proper setup/teardown (and making your actual test much shorter/readable in the process).
Codecov Report
@@ Coverage Diff @@
## master #2510 +/- ##
=======================================
Coverage 53.71% 53.71%
=======================================
Files 558 558
Lines 40587 40587
=======================================
Hits 21800 21800
Misses 18787 18787 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
👍
ead4ee9
to
d871352
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Closes #2500