[PR #3866] [MERGED] Add FilterSet tests for all apps #12667

Closed
opened 2025-12-29 22:22:56 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/3866
Author: @jeremystretch
Created: 1/9/2020
Status: Merged
Merged: 1/9/2020
Merged by: @jeremystretch

Base: developHead: 3834-filter-tests


📝 Commits (10+)

  • 4b5c4b7 Initial work on filter tests
  • 8d0aaa4 Add IPAM filter tests (WIP)
  • 05bfe94 Add remaining IPAM filter tests
  • f267a53 Add filter tests for secrets
  • 39d0261 Add tests for tenancy filters
  • 227921e Add tests for virtualization filters
  • acb2f32 Add tests for DCIM filters
  • 832fd49 Add DeviceType filter tests
  • a7982bb Add device filter tests
  • 5cac900 Add console port, console server port filter tests

📊 Changes

14 files changed (+4121 additions, -2 deletions)

View changed files

📝 netbox/circuits/filters.py (+7 -0)
netbox/circuits/tests/test_filters.py (+287 -0)
📝 netbox/dcim/filters.py (+39 -0)
netbox/dcim/tests/test_filters.py (+2381 -0)
📝 netbox/extras/filters.py (+14 -0)
netbox/extras/tests/test_filters.py (+181 -0)
📝 netbox/ipam/filters.py (+13 -0)
netbox/ipam/tests/test_filters.py (+645 -0)
📝 netbox/secrets/filters.py (+6 -0)
netbox/secrets/tests/test_filters.py (+92 -0)
📝 netbox/tenancy/filters.py (+6 -0)
netbox/tenancy/tests/test_filters.py (+74 -0)
📝 netbox/virtualization/filters.py (+9 -2)
netbox/virtualization/tests/test_filters.py (+367 -0)

📄 Description

Fixes: #3834

Introduces test_filters.py within the tests/ directory under each app. Includes tests for almost every FilterSet (waiting on v2.7 to finish a few of them).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/3866 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 1/9/2020 **Status:** ✅ Merged **Merged:** 1/9/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `3834-filter-tests` --- ### 📝 Commits (10+) - [`4b5c4b7`](https://github.com/netbox-community/netbox/commit/4b5c4b7be5092a26ef321209f1b92f9c14b6d3c0) Initial work on filter tests - [`8d0aaa4`](https://github.com/netbox-community/netbox/commit/8d0aaa4ec1e19a48b5df21e8da9a81286294c459) Add IPAM filter tests (WIP) - [`05bfe94`](https://github.com/netbox-community/netbox/commit/05bfe94d3e4ef1bfc0014ce1445378440029fe99) Add remaining IPAM filter tests - [`f267a53`](https://github.com/netbox-community/netbox/commit/f267a532f6e39da4e15102292a930d61ad691472) Add filter tests for secrets - [`39d0261`](https://github.com/netbox-community/netbox/commit/39d0261d8a325be1c6d50d3a47e0563f3dcdfa8e) Add tests for tenancy filters - [`227921e`](https://github.com/netbox-community/netbox/commit/227921e0a0aee15cf7e550126f2ff49596a66760) Add tests for virtualization filters - [`acb2f32`](https://github.com/netbox-community/netbox/commit/acb2f323043d02195654c48c3f8439a18de29c11) Add tests for DCIM filters - [`832fd49`](https://github.com/netbox-community/netbox/commit/832fd49339f32fa2e07a05cc14096b3c7988262a) Add DeviceType filter tests - [`a7982bb`](https://github.com/netbox-community/netbox/commit/a7982bb0e136476d502a284ec21ca9ee9423f526) Add device filter tests - [`5cac900`](https://github.com/netbox-community/netbox/commit/5cac900380ddf4ef1a91ad6ced08577ec91902a1) Add console port, console server port filter tests ### 📊 Changes **14 files changed** (+4121 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `netbox/circuits/filters.py` (+7 -0) ➕ `netbox/circuits/tests/test_filters.py` (+287 -0) 📝 `netbox/dcim/filters.py` (+39 -0) ➕ `netbox/dcim/tests/test_filters.py` (+2381 -0) 📝 `netbox/extras/filters.py` (+14 -0) ➕ `netbox/extras/tests/test_filters.py` (+181 -0) 📝 `netbox/ipam/filters.py` (+13 -0) ➕ `netbox/ipam/tests/test_filters.py` (+645 -0) 📝 `netbox/secrets/filters.py` (+6 -0) ➕ `netbox/secrets/tests/test_filters.py` (+92 -0) 📝 `netbox/tenancy/filters.py` (+6 -0) ➕ `netbox/tenancy/tests/test_filters.py` (+74 -0) 📝 `netbox/virtualization/filters.py` (+9 -2) ➕ `netbox/virtualization/tests/test_filters.py` (+367 -0) </details> ### 📄 Description ### Fixes: #3834 Introduces `test_filters.py` within the `tests/` directory under each app. Includes tests for _almost_ every FilterSet (waiting on v2.7 to finish a few of them). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:22:56 +01:00
adam closed this issue 2025-12-29 22:22:57 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12667