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

Unified Diff: tests/xtm_conftest.py

Issue 29968558: Issue 7037 - [XTM Integration] Make REST API url customizable
Patch Set: Merged with changes from 7039 Created Sept. 17, 2019, 1:37 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
« no previous file with comments | « tests/utils.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/xtm_conftest.py
diff --git a/tests/xtm_conftest.py b/tests/xtm_conftest.py
index 68e62e344f2b98d096bd8923c91a20c6e3d6b2e3..0ae822794c68950e413df1aa240f164c213d7ae2 100644
--- a/tests/xtm_conftest.py
+++ b/tests/xtm_conftest.py
@@ -75,6 +75,29 @@ def temp_site_function_scope(tmpdir):
return site_dir
+@pytest.fixture
+def temp_site_url_in_config(tmpdir):
+ out_dir = tmpdir.mkdir('temp_site_url')
+ site_dir = out_dir.join('test_site').strpath
+
+ shutil.copytree(os.path.join(ROOTPATH, 'tests', 'test_site'), site_dir)
+
+ with FileSource(str(site_dir)) as fs:
+ fs.write_to_config('XTM', 'url', 'www.bar.com')
+
+ return site_dir
+
+
+@pytest.fixture
+def temp_site_no_project(tmpdir):
+ out_dir = tmpdir.mkdir('temp_site_url')
+ site_dir = out_dir.join('test_site').strpath
+
+ shutil.copytree(os.path.join(ROOTPATH, 'tests', 'test_site'), site_dir)
+
+ return site_dir
+
+
@pytest.fixture
def intercept():
app = get_configured_app()
« no previous file with comments | « tests/utils.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld