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_alias_from_alias(self):
self._deploy()
commands.alias('latest', ['greatest'])
check_call_silent(['git', 'checkout', 'gh-pages'])
self._test_alias(expected_src='latest')
def test_commit_message(self):
self._deploy()
commands.alias('1.0', ['greatest'], message='commit message')
check_call_silent(['git', 'checkout', 'gh-pages'])
self._test_alias('^commit message$')
def test_alias_invalid(self):
self._deploy()
self.assertRaises(ValueError, commands.alias, '2.0', ['alias'])
self.assertRaises(ValueError, commands.alias, '1.0', ['alias'],
branch='branch')
def test_branch(self):
self._deploy('branch')
commands.alias('1.0', ['greatest'], branch='branch')
check_call_silent(['git', 'checkout', 'branch'])
self._test_alias()
def test_alias_from_version(self):
self._deploy()
commands.alias('1.0', ['greatest'])
check_call_silent(['git', 'checkout', 'gh-pages'])
self._test_alias()
def alias(args):
check_remote_status(args, strict=True)
commands.alias(args.version, args.alias, args.branch, args.message)
if args.push:
git_utils.push_branch(args.remote, args.branch, args.force)