1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Docs and test for #9072

This commit is contained in:
jeremystretch
2022-10-07 15:03:52 -04:00
parent 1fc8de85a3
commit 053c97b7a8
7 changed files with 59 additions and 2 deletions

View File

@ -59,6 +59,17 @@ class PluginTest(TestCase):
response = client.get(url)
self.assertEqual(response.status_code, 200)
def test_registered_views(self):
# Test URL resolution
url = reverse('dcim:site_extra', kwargs={'pk': 1})
self.assertEqual(url, '/dcim/sites/1/other-stuff/')
# Test GET request
client = Client()
response = client.get(url)
self.assertEqual(response.status_code, 200)
def test_menu(self):
"""
Check menu registration.