-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Put quotes around path components which have special characters
Someday we might want to support this properly in wrap()/unwrap() but for now it's only required on a component that is always at the end of the path.
- Loading branch information
Showing
4 changed files
with
24 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -185,7 +185,7 @@ def test_edit_page_translation(self): | |
self.assertEqual( | ||
[(segment['contentPath'], segment['value']) for segment in props['segments'] if segment['type'] == 'synchronised_value'], | ||
[ | ||
('test_richtextfield.http://example.com', 'http://example.com'), | ||
("test_richtextfield.'http://example.com'", 'http://example.com'), | ||
('test_synchronized_emailfield', '[email protected]'), | ||
] | ||
) | ||
|
@@ -200,7 +200,7 @@ def test_edit_page_translation(self): | |
# Check synchronised value | ||
synchronised_value_segment = props['segments'][9] | ||
self.assertEqual(synchronised_value_segment['type'], 'synchronised_value') | ||
self.assertEqual(synchronised_value_segment['contentPath'], 'test_richtextfield.http://example.com') | ||
self.assertEqual(synchronised_value_segment['contentPath'], "test_richtextfield.'http://example.com'") | ||
self.assertEqual(synchronised_value_segment['location'], {'blockId': None, 'field': 'Test richtextfield', 'fieldHelpText': '', 'order': 6, 'subField': None, 'tab': 'content', 'widget': {'type': 'text'}}) | ||
self.assertEqual(synchronised_value_segment['value'], 'http://example.com') | ||
|
||
|
@@ -360,7 +360,7 @@ def test_override_types(self): | |
self.assertEqual( | ||
[(segment['contentPath'], segment['location']['widget'], segment['value']) for segment in props['segments'] if segment['type'] == 'synchronised_value'], | ||
[ | ||
('test_richtextfield.http://example.com', {'type': 'text'}, 'http://example.com'), | ||
("test_richtextfield.'http://example.com'", {'type': 'text'}, 'http://example.com'), | ||
(f'test_streamfield.{url_block_id}', {'type': 'text'}, "https://wagtail.io/"), | ||
(f'test_streamfield.{page_block_id}', {'type': 'page_chooser', 'allowed_page_types': ['wagtailcore.page']}, self.page.id), | ||
(f'test_streamfield.{image_block_id}', {'type': 'image_chooser'}, self.page.test_synchronized_image.id), | ||
|