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

Unified Diff: tests/conftest.py

Issue 29912588: Issue 7019 - [CMS] Refactor `test_server.py` (Closed)
Patch Set: Updated exception tests. Removed duplicates from ignores Created Oct. 18, 2018, 4:09 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/conftest.py
diff --git a/tests/conftest.py b/tests/conftest.py
index a8c274223cafc15d1ed829f2bcfa1fe95eef62f5..2f765f45930f015911462c59c7ca135962b568cb 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -21,3 +21,16 @@ def temp_site(tmpdir_factory):
shutil.copytree(os.path.join(ROOTPATH, 'tests', 'test_site'), site_dir)
yield site_dir
+
+
+@pytest.fixture(scope='session')
+def temp_site_with_conflicts(tmpdir_factory):
+ out_dir = tmpdir_factory.mktemp('temp_out_conflicts')
+ 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, 'locales', 'en', 'translate'), 'w') \
Vasily Kuznetsov 2018/10/22 14:36:47 Nit: maybe construct the path in a separate line t
Tudor Avram 2018/10/23 16:44:34 Done.
+ as f:
+ f.write('Page with conflicts')
+
+ yield site_dir

Powered by Google App Engine
This is Rietveld