2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 04:55:44 +00:00

Exclude testing exceptions from coverage (#3046)

* exclude testing excetions

* check user str

* check related users

* move no coverage marker

* fix assertation

* add test for filters

* do not cover logs
This commit is contained in:
Matthias Mair
2022-05-22 07:54:13 +02:00
committed by GitHub
parent 0ec067da40
commit 6247eecf69
7 changed files with 26 additions and 10 deletions

View File

@ -156,14 +156,14 @@ class SettingsTest(InvenTreeTestCase):
try:
self.run_settings_check(key, setting)
except Exception as exc:
except Exception as exc: # pragma: no cover
print(f"run_settings_check failed for global setting '{key}'")
raise exc
for key, setting in InvenTreeUserSetting.SETTINGS.items():
try:
self.run_settings_check(key, setting)
except Exception as exc:
except Exception as exc: # pragma: no cover
print(f"run_settings_check failed for user setting '{key}'")
raise exc
@ -501,8 +501,12 @@ class PluginSettingsApiTest(InvenTreeAPITestCase):
"""List installed plugins via API"""
url = reverse('api-plugin-list')
# Simple request
self.get(url, expected_code=200)
# Request with filter
self.get(url, expected_code=200, data={'mixin': 'settings'})
def test_api_list(self):
"""Test list URL"""
url = reverse('api-plugin-setting-list')