# HG changeset patch # User Martin Bornhold # Date 2016-06-17 07:41:38 # Node ID c1cbe8e0ea6344395664139014c172a15e4bdd64 # Parent c0fc5cc3aae807cfe77285a0f8fc368c5ee43f93 pytest: Create test search index from rc_testdata package. diff --git a/rhodecode/lib/utils.py b/rhodecode/lib/utils.py --- a/rhodecode/lib/utils.py +++ b/rhodecode/lib/utils.py @@ -718,10 +718,10 @@ def create_test_index(repo_location, con mv vcs_search_index.tar.gz rhodecode/tests/fixtures/ """ - cur_dir = dn(dn(abspath(__file__))) - with tarfile.open(jn(cur_dir, 'tests', 'fixtures', - 'vcs_search_index.tar.gz')) as tar: - tar.extractall(os.path.dirname(config['search.location'])) + import rc_testdata + + rc_testdata.extract_search_index( + 'vcs_search_index', os.path.dirname(config['search.location'])) def create_test_env(repos_test_path, config):