test methods require specific naming 'test_*' #9405

Closed
opened 2025-12-29 20:49:22 +01:00 by adam · 3 comments
Owner

Originally created by @hackcl on GitHub (Mar 28, 2024).

Change Type

Addition

Area

Customization

Proposed Changes

If you create a Report class which should contain multiple tests it is required that each test starts with 'test_*' to be correct and to avoid an invalid Report.

Originally created by @hackcl on GitHub (Mar 28, 2024). ### Change Type Addition ### Area Customization ### Proposed Changes If you create a Report class which should contain multiple tests it is required that each test starts with 'test_*' to be correct and to avoid an invalid Report.
adam added the type: documentation label 2025-12-29 20:49:22 +01:00
adam closed this issue 2025-12-29 20:49:23 +01:00
Author
Owner

@hackcl commented on GitHub (Mar 28, 2024):

I would open a pull request as owner. 6fd27f84f0

@hackcl commented on GitHub (Mar 28, 2024): I would open a pull request as owner. https://github.com/netbox-community/netbox/commit/6fd27f84f0f4f8c867a7ebe97737019074703d81
Author
Owner

@jeffgdotorg commented on GitHub (Apr 1, 2024):

Thanks for helping improve the NetBox documentation!

Because we're on the cusp of releasing the first beta of NetBox 4.0, I'm going to make an unusual request. Please bear with me, I think you'll understand.

One big thing that changes between 3.7 and 4.0 is that Reports cease to be their own "thing" and are merged into a special case of Custom Scripts. We've already done the work in the feature branch (which is where we've been doing the work that will become 4.0) to remove the Reports documentation and roll it into the Custom Scripts docs. Since this hint is valuable but not earth-shaking, and because merging your proposed PR would create a merge conflict the next time we go to make a periodic merge of develop into feature, we ask you to reformulate your proposed changes as follows:

  • Retarget your change to the Custom Scripts module in the feature branch. You'll need to find the right place for it, as we did some reorganizing in there.
  • Revise your change to conform with our conventions for use of Markdown in the NetBox docs. Specifically, please use backticks around both the method prefix and the example method name.

This implies that your change won't make it into 3.7.x, but we can live with that and are happy to adopt it for 4.0.x.

@jeffgdotorg commented on GitHub (Apr 1, 2024): Thanks for helping improve the NetBox documentation! Because we're on the cusp of releasing the first beta of NetBox 4.0, I'm going to make an unusual request. Please bear with me, I think you'll understand. One big thing that changes between 3.7 and 4.0 is that [Reports cease to be their own "thing" and are merged into a special case of Custom Scripts](https://github.com/netbox-community/netbox/issues/12510). We've already done the work in the `feature` branch (which is where we've been doing the work that will become 4.0) to remove the Reports documentation and roll it into the Custom Scripts docs. Since this hint is valuable but not earth-shaking, and because merging your proposed PR would create a merge conflict the next time we go to make a periodic merge of `develop` into `feature`, we ask you to reformulate your proposed changes as follows: - Retarget your change to the [Custom Scripts module in the `feature` branch](https://github.com/netbox-community/netbox/blob/feature/docs/customization/custom-scripts.md). You'll need to find the right place for it, as we did some reorganizing in there. - Revise your change to conform with our conventions for use of Markdown in the NetBox docs. Specifically, please use backticks around both the method prefix and the example method name. This implies that your change won't make it into 3.7.x, but we can live with that and are happy to adopt it for 4.0.x.
Author
Owner

@hackcl commented on GitHub (Apr 5, 2024):

@jeffgdotorg , Issue can be closed as I found the part I wanted to add already in the documentation for the new scripts: 0abd0948b6/docs/customization/custom-scripts.md (L157)

@hackcl commented on GitHub (Apr 5, 2024): @jeffgdotorg , Issue can be closed as I found the part I wanted to add already in the documentation for the new scripts: https://github.com/netbox-community/netbox/blob/0abd0948b661740688a62ba344d147ad229235ba/docs/customization/custom-scripts.md?plain=1#L157
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9405