From 11cc0c7cedb5ecc11517ee504dc2851f08493bfb Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 17 Sep 2021 20:53:18 +1000 Subject: [PATCH] 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): """