Changeset - 736f058d6172
[Not reviewed]
default
0 1 0
domruf - 8 years ago 2018-01-25 22:17:00
dominikruf@gmail.com
Grafted from: b13366f17987
tests: split _add_files_and_push in two

In some cases it is usefull to push the data separately.
For example if a test tries to push multiple times.
1 file changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/tests/other/test_vcs_operations.py
Show inline comments
 
@@ -83,8 +83,7 @@ def _get_tmp_dir(prefix='vcs_operations-
 
    return tempfile.mkdtemp(dir=TESTS_TMP_PATH, prefix=prefix, suffix=suffix)
 

	
 

	
 
def _add_files_and_push(webserver, vcs, dest_dir, ignoreReturnCode=False, files_no=3,
 
                        clone_url=None, username=TEST_USER_ADMIN_LOGIN, password=TEST_USER_ADMIN_PASS):
 
def _add_files(vcs, dest_dir, files_no=3):
 
    """
 
    Generate some files, add it to dest_dir repo and push back
 
    vcs is git or hg and defines what VCS we want to make those files for
 
@@ -115,6 +114,9 @@ def _add_files_and_push(webserver, vcs, 
 
        # git commit needs EMAIL on some machines
 
        Command(dest_dir).execute(cmd, EMAIL=email)
 

	
 
def _add_files_and_push(webserver, vcs, dest_dir, ignoreReturnCode=False, files_no=3,
 
                            clone_url=None, username=TEST_USER_ADMIN_LOGIN, password=TEST_USER_ADMIN_PASS):
 
    _add_files(vcs, dest_dir, files_no=files_no)
 
    # PUSH it back
 
    _REPO = None
 
    if vcs == 'hg':
0 comments (0 inline, 0 general)