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_branch(self):
self._deploy('branch')
commands.set_default('1.0', branch='branch')
check_call_silent(['git', 'checkout', 'branch'])
self._test_default()
def test_commit_message(self):
self._deploy()
commands.set_default('1.0', message='commit message')
check_call_silent(['git', 'checkout', 'gh-pages'])
self._test_default('commit message')
def test_set_default(self):
self._deploy()
commands.set_default('1.0')
check_call_silent(['git', 'checkout', 'gh-pages'])
self._test_default()
def test_set_invalid_default(self):
self._deploy()
self.assertRaises(ValueError, commands.set_default, '2.0')
self.assertRaises(ValueError, commands.set_default, '1.0',
branch='branch')
def set_default(args):
check_remote_status(args, strict=True)
commands.set_default(args.version, args.branch, args.message)
if args.push:
git_utils.push_branch(args.remote, args.branch, args.force)