Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: tests/xtm_conftest.py

Issue 29906560: Issue 7042 - [XTM Integration] Solve UnicodeDecodeErrors occuring (Closed)
Patch Set: Created Oct. 10, 2018, 1:53 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/xtm_conftest.py
diff --git a/tests/xtm_conftest.py b/tests/xtm_conftest.py
index 68e62e344f2b98d096bd8923c91a20c6e3d6b2e3..023b016e44cf82d06fd0a0c7b5fa8fa88057f8a8 100644
--- a/tests/xtm_conftest.py
+++ b/tests/xtm_conftest.py
@@ -112,3 +112,16 @@ def intercept_too_many_targets():
add_wsgi_intercept(_INTERCEPT_HOST, _INTERCEPT_PORT, lambda: app)
yield app
remove_wsgi_intercept()
+
+
+@pytest.fixture
Vasily Kuznetsov 2018/10/10 14:01:26 I would say that it makes sense to just add this f
Tudor Avram 2018/10/11 13:58:28 Done.
+def tmpsite_with_unicode(tmpdir):
+ out_dir = tmpdir.mkdir('temp_site_unicode')
+ site_dir = out_dir.join('test_site').strpath
+
+ shutil.copytree(os.path.join(ROOTPATH, 'tests', 'test_site'), site_dir)
+
+ with open(os.path.join(site_dir, 'pages', 'unicode.md'), 'wb') as f:
+ f.write("- {{simple \u1234 | translate('utf-8')}}.".encode('utf-8'))
+
+ return site_dir
« tests/test_xtm_translations_utils.py ('K') | « tests/test_xtm_translations_utils.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld