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

Initial implementation of tests for plugins framework

This commit is contained in:
Jeremy Stretch
2020-04-01 17:08:47 -04:00
parent 093181c186
commit 30e330c887
16 changed files with 237 additions and 1 deletions

View File

@ -19,7 +19,8 @@ plugin_admin_patterns = [
# Register base/API URL patterns for each plugin
for plugin in settings.PLUGINS:
app = apps.get_app_config(plugin)
plugin_name = plugin.split('.')[-1]
app = apps.get_app_config(plugin_name)
base_url = getattr(app, 'base_url') or app.label
# Check if the plugin specifies any base URLs