def test_parse_args_with_only_tarball(self): args = import_conf.parse_args(['tarball.tar.gz']) self.assertIsNone(args.debile_user) self.assertEqual(args.conf_dir, '/etc/debile/') self.assertEqual(args.keyring, '~/.gnupg/pubring.gpg') self.assertEqual(args.secret_keyring, '~/.gnupg/secring.gpg') self.assertEqual(args.auth_method, 'ssl') self.assertEqual(args.tarball, 'tarball.tar.gz') self.assertEqual(args.gpg_home_dir, '~/.gnupg/')
def test_parse_args_with_all_args(self): args = import_conf.parse_args(['tarball.tar.gz', '--conf-dir', '~/debile', '--keyring', '~/keyring.gpg', '--secret-keyring', '~/secret.gpg', '--auth', 'simple', '--user', 'john', '--gpg-home', '~/']) self.assertEqual(args.debile_user, 'john') self.assertEqual(args.conf_dir, '~/debile') self.assertEqual(args.keyring, '~/keyring.gpg') self.assertEqual(args.secret_keyring, '~/secret.gpg') self.assertEqual(args.auth_method, 'simple') self.assertEqual(args.tarball, 'tarball.tar.gz') self.assertEqual(args.gpg_home_dir, '~/')
def test_parse_args_with_all_args(self): args = import_conf.parse_args([ 'tarball.tar.gz', '--conf-dir', '~/debile', '--keyring', '~/keyring.gpg', '--secret-keyring', '~/secret.gpg', '--auth', 'simple', '--user', 'john', '--gpg-home', '~/' ]) self.assertEqual(args.debile_user, 'john') self.assertEqual(args.conf_dir, '~/debile') self.assertEqual(args.keyring, '~/keyring.gpg') self.assertEqual(args.secret_keyring, '~/secret.gpg') self.assertEqual(args.auth_method, 'simple') self.assertEqual(args.tarball, 'tarball.tar.gz') self.assertEqual(args.gpg_home_dir, '~/')