From b5b6d75e23ef0f35d633b0117264c2226f8f1329 Mon Sep 17 00:00:00 2001
From: Oliver <oliver.henry.walters@gmail.com>
Date: Wed, 10 Jan 2024 22:19:37 +1100
Subject: [PATCH] Typo fix (#6181)

exsist -> exist
---
 InvenTree/InvenTree/test_tasks.py                           | 4 ++--
 InvenTree/common/models.py                                  | 2 +-
 InvenTree/common/tests.py                                   | 4 ++--
 InvenTree/plugin/base/action/test_action.py                 | 6 +++---
 InvenTree/plugin/base/label/test_label_mixin.py             | 2 +-
 InvenTree/plugin/samples/integration/test_scheduled_task.py | 2 +-
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/InvenTree/InvenTree/test_tasks.py b/InvenTree/InvenTree/test_tasks.py
index 3dacc41cca..cb14dfc962 100644
--- a/InvenTree/InvenTree/test_tasks.py
+++ b/InvenTree/InvenTree/test_tasks.py
@@ -75,8 +75,8 @@ class InvenTreeTaskTests(TestCase):
             InvenTree.tasks.offload_task('InvenTreeABC.test_tasks.doesnotmatter')
 
         # Non existent function
-        with self.assertWarnsMessage(UserWarning, "WARNING: 'InvenTree.test_tasks.doesnotexsist' not started - No function named 'doesnotexsist'"):
-            InvenTree.tasks.offload_task('InvenTree.test_tasks.doesnotexsist')
+        with self.assertWarnsMessage(UserWarning, "WARNING: 'InvenTree.test_tasks.doesnotexist' not started - No function named 'doesnotexist'"):
+            InvenTree.tasks.offload_task('InvenTree.test_tasks.doesnotexist')
 
     def test_task_hearbeat(self):
         """Test the task heartbeat."""
diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py
index e177f17d57..620f598970 100644
--- a/InvenTree/common/models.py
+++ b/InvenTree/common/models.py
@@ -2472,7 +2472,7 @@ class ColorTheme(models.Model):
     def get_color_themes_choices(cls):
         """Get all color themes from static folder."""
         if not settings.STATIC_COLOR_THEMES_DIR.exists():
-            logger.error('Theme directory does not exsist')
+            logger.error('Theme directory does not exist')
             return []
 
         # Get files list from css/color-themes/ folder
diff --git a/InvenTree/common/tests.py b/InvenTree/common/tests.py
index 61590411f8..c8167aec3f 100644
--- a/InvenTree/common/tests.py
+++ b/InvenTree/common/tests.py
@@ -655,9 +655,9 @@ class PluginSettingsApiTest(PluginMixin, InvenTreeAPITestCase):
         self.assertIn("Plugin 'doesnotexist' not installed", str(response.data))
 
         # Wrong key
-        url = reverse('api-plugin-setting-detail', kwargs={'plugin': 'sample', 'key': 'doesnotexsist'})
+        url = reverse('api-plugin-setting-detail', kwargs={'plugin': 'sample', 'key': 'doesnotexist'})
         response = self.get(url, expected_code=404)
-        self.assertIn("Plugin 'sample' has no setting matching 'doesnotexsist'", str(response.data))
+        self.assertIn("Plugin 'sample' has no setting matching 'doesnotexist'", str(response.data))
 
     def test_invalid_setting_key(self):
         """Test that an invalid setting key returns a 404."""
diff --git a/InvenTree/plugin/base/action/test_action.py b/InvenTree/plugin/base/action/test_action.py
index 898bfb2647..2a834ae63f 100644
--- a/InvenTree/plugin/base/action/test_action.py
+++ b/InvenTree/plugin/base/action/test_action.py
@@ -83,10 +83,10 @@ class APITests(InvenTreeTestCase):
             {'error': 'No action specified'}
         )
 
-        # Test non-exsisting action
-        response = self.client.post('/api/action/', data={'action': "nonexsisting"})
+        # Test non-existing action
+        response = self.client.post('/api/action/', data={'action': "nonexisting"})
         self.assertEqual(response.status_code, 200)
         self.assertEqual(
             response.data,
-            {'error': 'No matching action found', 'action': 'nonexsisting'}
+            {'error': 'No matching action found', 'action': 'nonexisting'}
         )
diff --git a/InvenTree/plugin/base/label/test_label_mixin.py b/InvenTree/plugin/base/label/test_label_mixin.py
index 2eedbcc156..bb6389b80a 100644
--- a/InvenTree/plugin/base/label/test_label_mixin.py
+++ b/InvenTree/plugin/base/label/test_label_mixin.py
@@ -145,7 +145,7 @@ class LabelMixinTests(InvenTreeAPITestCase):
 
         url = self.do_url([part], plugin_ref, label)
 
-        # Non-exsisting plugin
+        # Non-existing plugin
         response = self.get(f'{url}123', expected_code=404)
         self.assertIn(f'Plugin \'{plugin_ref}123\' not found', str(response.content, 'utf8'))
 
diff --git a/InvenTree/plugin/samples/integration/test_scheduled_task.py b/InvenTree/plugin/samples/integration/test_scheduled_task.py
index 7e433178f1..78a05e52e9 100644
--- a/InvenTree/plugin/samples/integration/test_scheduled_task.py
+++ b/InvenTree/plugin/samples/integration/test_scheduled_task.py
@@ -62,7 +62,7 @@ class ExampleScheduledTaskPluginTests(TestCase):
         self.assertEqual(call_function('schedule', 'member_func'), False)
 
         # Check with wrong key
-        self.assertEqual(call_function('does_not_exsist', 'member_func'), None)
+        self.assertEqual(call_function('does_not_exist', 'member_func'), None)
 
 
 class ScheduledTaskPluginTests(TestCase):