Skip to content

Commit 04bba09

Browse files
committed
Added disabled unit test for backslash escape
1 parent d76d647 commit 04bba09

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
"""
2+
Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
3+
The Universal Permissive License (UPL), Version 1.0
4+
"""
5+
import unittest
6+
7+
from java.io import ByteArrayInputStream
8+
from oracle.weblogic.deploy.json import JsonStreamTranslator
9+
10+
11+
class JsonTranslatorTest(unittest.TestCase):
12+
13+
def disabled_testEscapeBackslash(self):
14+
# JSON "xy\\.z" should become String "xy\.z"
15+
text = "{ \"abc\": \"xy\\\\.z\" }"
16+
stream = ByteArrayInputStream(text.encode('utf-8'))
17+
json_translator = JsonStreamTranslator("String", stream)
18+
result = json_translator.parse()
19+
abc = result['abc']
20+
self.assertEquals("xy\\.z", abc, "Should be single slash")

0 commit comments

Comments
 (0)