From 2e4ad9fbc07a2ed408c017df93e5116d97a221e9 Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Wed, 25 Mar 2020 19:31:42 +0000 Subject: Tests: UTF-8 BOM test. --- test/test_configuration.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'test') diff --git a/test/test_configuration.py b/test/test_configuration.py index 186e037d..2acb7ccd 100644 --- a/test/test_configuration.py +++ b/test/test_configuration.py @@ -83,6 +83,25 @@ class TestConfiguration(TestControl): 'unicode number', ) + def test_json_utf8_bom(self): + self.assertIn( + 'success', + self.conf( + b"""\xEF\xBB\xBF + { + "app": { + "type": "python", + "processes": {"spare": 0}, + "path": "/app", + "module": "wsgi" + } + } + """, + 'applications', + ), + 'UTF-8 BOM', + ) + def test_applications_open_brace(self): self.assertIn('error', self.conf('{', 'applications'), 'open brace') -- cgit