예제 #1
0
 def test_init_defaults(self):
     runGitFlow('init', '--defaults')
     gitflow = GitFlow('.').init()
     self.assertEquals('origin', gitflow.origin_name())
     self.assertEquals('master', gitflow.master_name())
     self.assertEquals('develop', gitflow.develop_name())
     self.assertEquals('feature/', gitflow.get_prefix('feature'))
     self.assertEquals('release/', gitflow.get_prefix('release'))
     self.assertEquals('hotfix/', gitflow.get_prefix('hotfix'))
     self.assertEquals('support/', gitflow.get_prefix('support'))
     self.assertEquals('', gitflow.get_prefix('versiontag'))
예제 #2
0
 def test_init_defaults(self):
     run_git_flow('init', '--defaults')
     gitflow = GitFlow('.').init()
     self.assertEquals('origin', gitflow.origin_name())
     self.assertEquals('master', gitflow.master_name())
     self.assertEquals('develop', gitflow.develop_name())
     self.assertEquals('feature/', gitflow.get_prefix('feature'))
     self.assertEquals('release/', gitflow.get_prefix('release'))
     self.assertEquals('hotfix/', gitflow.get_prefix('hotfix'))
     self.assertEquals('support/', gitflow.get_prefix('support'))
     self.assertEquals('', gitflow.get_prefix('versiontag'))
예제 #3
0
 def test_init_force_defaults_succeeds_if_already_initialized(self):
     run_git_flow('init', '--defaults', '--force')
     gitflow = GitFlow('.').init()
     # these are the values already defined in custom_repo
     self.assertEquals('origin', gitflow.origin_name())
     self.assertEquals('production', gitflow.master_name())
     self.assertEquals('master', gitflow.develop_name())
     self.assertEquals('f-', gitflow.get_prefix('feature'))
     self.assertEquals('rel-', gitflow.get_prefix('release'))
     self.assertEquals('hf-', gitflow.get_prefix('hotfix'))
     self.assertEquals('supp-', gitflow.get_prefix('support'))
     self.assertEquals('v', gitflow.get_prefix('versiontag'))
예제 #4
0
 def test_init_force_defaults_succeeds_if_already_initialized(self):
     runGitFlow('init', '--defaults', '--force')
     gitflow = GitFlow('.').init()
     # these are the values already defined in custom_repo
     self.assertEquals('origin', gitflow.origin_name())
     self.assertEquals('production', gitflow.master_name())
     self.assertEquals('master', gitflow.develop_name())
     self.assertEquals('f-', gitflow.get_prefix('feature'))
     self.assertEquals('rel-', gitflow.get_prefix('release'))
     self.assertEquals('hf-', gitflow.get_prefix('hotfix'))
     self.assertEquals('supp-', gitflow.get_prefix('support'))
     self.assertEquals('v', gitflow.get_prefix('versiontag'))
예제 #5
0
 def test_init_accepting_defaults(self):
     text = u'\n' * 8
     _stdin, sys.stdin = sys.stdin, StringIO(text)
     try:
         run_git_flow('init')
     finally:
         sys.stdin = _stdin
     gitflow = GitFlow('.').init()
     self.assertEquals('origin', gitflow.origin_name())
     self.assertEquals('master', gitflow.master_name())
     self.assertEquals('develop', gitflow.develop_name())
     self.assertEquals('feature/', gitflow.get_prefix('feature'))
     self.assertEquals('release/', gitflow.get_prefix('release'))
     self.assertEquals('hotfix/', gitflow.get_prefix('hotfix'))
     self.assertEquals('support/', gitflow.get_prefix('support'))
     self.assertEquals('', gitflow.get_prefix('versiontag'))
예제 #6
0
 def test_init_accepting_defaults(self):
     text = '\n'*8
     _stdin, sys.stdin = sys.stdin, StringIO(text)
     try:
         runGitFlow('init')
     finally:
         sys.stdin = _stdin
     gitflow = GitFlow('.').init()
     self.assertEquals('origin', gitflow.origin_name())
     self.assertEquals('master', gitflow.master_name())
     self.assertEquals('develop', gitflow.develop_name())
     self.assertEquals('feature/', gitflow.get_prefix('feature'))
     self.assertEquals('release/', gitflow.get_prefix('release'))
     self.assertEquals('hotfix/', gitflow.get_prefix('hotfix'))
     self.assertEquals('support/', gitflow.get_prefix('support'))
     self.assertEquals('', gitflow.get_prefix('versiontag'))
예제 #7
0
 def test_init_custom_accepting_some_defaults(self):
     text = u'\n'.join(
         ['my-remote', '', 'devel', 'feat/', '', '', 'sup/', 'v'])
     _stdin, sys.stdin = sys.stdin, StringIO(text)
     try:
         run_git_flow('init')
     finally:
         sys.stdin = _stdin
     gitflow = GitFlow('.').init()
     self.assertEquals('my-remote', gitflow.origin_name())
     self.assertEquals('master', gitflow.master_name())
     self.assertEquals('devel', gitflow.develop_name())
     self.assertEquals('feat/', gitflow.get_prefix('feature'))
     self.assertEquals('release/', gitflow.get_prefix('release'))
     self.assertEquals('hotfix/', gitflow.get_prefix('hotfix'))
     self.assertEquals('sup/', gitflow.get_prefix('support'))
     self.assertEquals('v', gitflow.get_prefix('versiontag'))
예제 #8
0
 def test_init_custom_accepting_some_defaults(self):
     text = '\n'.join(['my-remote', '', 'devel',
                       'feat/', '', '', 'sup/', 'v'])
     _stdin, sys.stdin = sys.stdin, StringIO(text)
     try:
         runGitFlow('init')
     finally:
         sys.stdin = _stdin
     gitflow = GitFlow('.').init()
     self.assertEquals('my-remote', gitflow.origin_name())
     self.assertEquals('master', gitflow.master_name())
     self.assertEquals('devel', gitflow.develop_name())
     self.assertEquals('feat/', gitflow.get_prefix('feature'))
     self.assertEquals('release/', gitflow.get_prefix('release'))
     self.assertEquals('hotfix/', gitflow.get_prefix('hotfix'))
     self.assertEquals('sup/', gitflow.get_prefix('support'))
     self.assertEquals('v', gitflow.get_prefix('versiontag'))