From 38cb557bafb7bb3915f0d3092b6318776fe63860 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 15 May 2022 01:07:35 +0200 Subject: [PATCH] Add test for wrong key --- InvenTree/common/tests.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/InvenTree/common/tests.py b/InvenTree/common/tests.py index b4a301692d..eba05639a6 100644 --- a/InvenTree/common/tests.py +++ b/InvenTree/common/tests.py @@ -503,6 +503,11 @@ class PluginSettingsApiTest(InvenTreeAPITestCase): response = self.get(url, expected_code=404) self.assertIn("Plugin 'doesnotexist' not installed", str(response.data)) + # Wrong key + url = reverse('api-plugin-setting-detail', kwargs={'plugin': 'sample', 'key': 'doesnotexsist'}) + response = self.get(url, expected_code=404) + self.assertIn("Plugin 'sample' has no setting matching 'doesnotexsist'", str(response.data)) + def test_invalid_setting_key(self): """Test that an invalid setting key returns a 404""" ...