Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_retitle(self):
self._deploy()
commands.retitle('1.0', '1.0.1')
check_call_silent(['git', 'checkout', 'gh-pages'])
self._test_retitle()
def test_retitle_invalid(self):
self._deploy()
self.assertRaises(ValueError, commands.retitle, '2.0', '2.0.2')
self.assertRaises(ValueError, commands.retitle, '1.0', '1.0.1',
branch='branch')
def test_commit_message(self):
self._deploy()
commands.retitle('1.0', '1.0.1', message='commit message')
check_call_silent(['git', 'checkout', 'gh-pages'])
self._test_retitle('commit message')
def test_branch(self):
self._deploy('branch')
commands.retitle('1.0', '1.0.1', branch='branch')
check_call_silent(['git', 'checkout', 'branch'])
self._test_retitle()
def retitle(args):
check_remote_status(args, strict=True)
commands.retitle(args.version, args.title, args.branch, args.message)
if args.push:
git_utils.push_branch(args.remote, args.branch, args.force)