From 11cc0c7cedb5ecc11517ee504dc2851f08493bfb Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 17 Sep 2021 20:53:18 +1000 Subject: [PATCH 1/3] Adds a test for non-standard characters via API --- InvenTree/part/test_api.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/InvenTree/part/test_api.py b/InvenTree/part/test_api.py index ebef21b84b..8150461b38 100644 --- a/InvenTree/part/test_api.py +++ b/InvenTree/part/test_api.py @@ -588,6 +588,21 @@ class PartAPITest(InvenTreeAPITestCase): self.assertEqual(new_part.supplier_parts.count(), 1) self.assertEqual(new_part.manufacturer_parts.count(), 1) + def test_strange_chars(self): + """ + Test that non-standard ASCII chars are accepted + """ + + url = reverse('api-part-list') + + data = { + "name": "Kaltgerätestecker", + "description": "Gerät", + "category": 2 + } + + response = self.post(url, data, expected_code=201) + class PartDetailTests(InvenTreeAPITestCase): """ From e7963f8a851d998791d932b569bf84dcf72fdc8b Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 17 Sep 2021 21:06:07 +1000 Subject: [PATCH 2/3] test fixes --- InvenTree/part/test_api.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/InvenTree/part/test_api.py b/InvenTree/part/test_api.py index 8150461b38..660b573e33 100644 --- a/InvenTree/part/test_api.py +++ b/InvenTree/part/test_api.py @@ -595,14 +595,20 @@ class PartAPITest(InvenTreeAPITestCase): url = reverse('api-part-list') + name = "Kaltgerätestecker" + description = "Gerät" + data = { - "name": "Kaltgerätestecker", - "description": "Gerät", + "name": name, + "description": description, "category": 2 } response = self.post(url, data, expected_code=201) + self.assertEqual(response.data['name'], name) + self.assertEqual(response.data['description'], description) + class PartDetailTests(InvenTreeAPITestCase): """ From 8d6d16c07bab19859120723f3395b52931784f26 Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 17 Sep 2021 22:13:13 +1000 Subject: [PATCH 3/3] Add template for app issues --- .github/ISSUE_TEMPLATE/app_issue.md | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/app_issue.md diff --git a/.github/ISSUE_TEMPLATE/app_issue.md b/.github/ISSUE_TEMPLATE/app_issue.md new file mode 100644 index 0000000000..e71861394c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/app_issue.md @@ -0,0 +1,30 @@ +--- +name: App issue +about: Report a bug or issue with the InvenTree app +title: "[APP] Enter bug description" +labels: bug, app +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of the bug or issue + +**To Reproduce** +Steps to reproduce the behavior: + +1. Go to ... +2. Select ... +3. ... + +**Expected Behavior** +A clear and concise description of what you expected to happen + +**Screenshots** +If applicable, add screenshots to help explain your problem + +**Version Information** + +- App platform: *Select iOS or Android* +- App version: *Enter app version* +- Server version: *Enter server version*