[PR #4728] [MERGED] Closes #4722: Standardize API view tests #12910

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/4728
Author: @jeremystretch
Created: 6/8/2020
Status: Merged
Merged: 6/8/2020
Merged by: @jeremystretch

Base: developHead: 4722-api-tests


📝 Commits (10+)

  • 4ae1879 Introduce APIViewTestCases for standardized API view testing
  • 4219691 Update circuits API tests to use APIViewTestCases
  • 1d5f2fb Correct test method name
  • 86e5a09 Optimize test_get_provider_graphs()
  • 8cc1dc9 Fix update data
  • 279ae7e Standardize DCIM API tests
  • 6656467 Standardize extras API tests
  • b5ebfd0 Standardize IPAM API tests
  • 1ee79ee Standardize SecretRoleTest
  • ae913f1 Standardize tenancy API tests

📊 Changes

11 files changed (+2103 additions, -6063 deletions)

View changed files

📝 netbox/circuits/tests/test_api.py (+133 -388)
📝 netbox/dcim/api/nested_serializers.py (+1 -0)
📝 netbox/dcim/tests/test_api.py (+1220 -3521)
📝 netbox/extras/tests/test_api.py (+134 -478)
📝 netbox/ipam/tests/test_api.py (+246 -902)
📝 netbox/secrets/tests/test_api.py (+28 -99)
📝 netbox/tenancy/tests/test_api.py (+39 -201)
📝 netbox/utilities/api.py (+1 -2)
📝 netbox/utilities/testing/testcases.py (+173 -37)
📝 netbox/virtualization/tests/test_api.py (+123 -430)
📝 netbox/virtualization/tests/test_views.py (+5 -5)

📄 Description

Fixes: #4722

  • Introduce APIViewTestCases
  • Refactor all REST API tests to use it
  • Add missing list_brief tests (see #4725)

🔄 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/4728 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 6/8/2020 **Status:** ✅ Merged **Merged:** 6/8/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `4722-api-tests` --- ### 📝 Commits (10+) - [`4ae1879`](https://github.com/netbox-community/netbox/commit/4ae1879b872c2e9843604cba8d20c23a449c86cf) Introduce APIViewTestCases for standardized API view testing - [`4219691`](https://github.com/netbox-community/netbox/commit/4219691e62724a5617ffa2d85eb635790139f8fd) Update circuits API tests to use APIViewTestCases - [`1d5f2fb`](https://github.com/netbox-community/netbox/commit/1d5f2fbd117add86ad03d843092ffdd140c12cd1) Correct test method name - [`86e5a09`](https://github.com/netbox-community/netbox/commit/86e5a09b01cd1a826b6673bff9787dfedb106f13) Optimize test_get_provider_graphs() - [`8cc1dc9`](https://github.com/netbox-community/netbox/commit/8cc1dc9f1c546c86122f7286029721c04fe5e345) Fix update data - [`279ae7e`](https://github.com/netbox-community/netbox/commit/279ae7ea10f94b4d8af7430863e7a226f456cf7e) Standardize DCIM API tests - [`6656467`](https://github.com/netbox-community/netbox/commit/665646707c77a08f25ab5fc8a62c0dc398ef3452) Standardize extras API tests - [`b5ebfd0`](https://github.com/netbox-community/netbox/commit/b5ebfd0b07729a739e1bfde1e60b2bfeeecc4db8) Standardize IPAM API tests - [`1ee79ee`](https://github.com/netbox-community/netbox/commit/1ee79ee61e8fa9e2349ce2399ce97082040a283e) Standardize SecretRoleTest - [`ae913f1`](https://github.com/netbox-community/netbox/commit/ae913f14ceb40718102c2c938e1ae4a0094ebd2b) Standardize tenancy API tests ### 📊 Changes **11 files changed** (+2103 additions, -6063 deletions) <details> <summary>View changed files</summary> 📝 `netbox/circuits/tests/test_api.py` (+133 -388) 📝 `netbox/dcim/api/nested_serializers.py` (+1 -0) 📝 `netbox/dcim/tests/test_api.py` (+1220 -3521) 📝 `netbox/extras/tests/test_api.py` (+134 -478) 📝 `netbox/ipam/tests/test_api.py` (+246 -902) 📝 `netbox/secrets/tests/test_api.py` (+28 -99) 📝 `netbox/tenancy/tests/test_api.py` (+39 -201) 📝 `netbox/utilities/api.py` (+1 -2) 📝 `netbox/utilities/testing/testcases.py` (+173 -37) 📝 `netbox/virtualization/tests/test_api.py` (+123 -430) 📝 `netbox/virtualization/tests/test_views.py` (+5 -5) </details> ### 📄 Description ### Fixes: #4722 - Introduce APIViewTestCases - Refactor all REST API tests to use it - Add missing `list_brief` tests (see #4725) --- <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:24:19 +01:00
adam closed this issue 2025-12-29 22:24:19 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12910