예제 #1
0
    def tearDown(self):
        # aparser = pamoney()

        setup_args = self.aparser.parser.parse_args(
            ('repo delete %s --in re qa' % self.rname).split())
        pulp_admin = ja(setup_args)
        mute()(pulp_admin.delete_repo)(repo_name=setup_args.name, envs=setup_args.envs)
예제 #2
0
    def tearDown(self):
        # aparser = pamoney()

        setup_args = self.aparser.parser.parse_args(
            ('repo delete %s --in re qa' % self.rname).split())
        pulp_admin = ja(setup_args)
        mute()(pulp_admin.delete_repo)(repo_name=setup_args.name, envs=setup_args.envs)
예제 #3
0
    def test_search(self):
        self.args = self.parser.parser.parse_args('search ruby'.split())
        pulp = j(self.args)
        mute()(pulp.search)(pkg_name=self.args.rpmname)

        self.args = self.parser.parser.parse_args(\
            'search ruby --in qa'.split())
        pulp = j(self.args)
        mute()(pulp.search)(pkg_name=self.args.rpmname)
예제 #4
0
    def _test_pull(self):
        if os.path.exists(self.cpath):
            os.remove(self.cpath)

        self.args = self.parser.parser.parse_args(('cart pull %s' % self.cname).split())
        pulp = j(self.args)
        mute()(pulp.pull)(self.cname)

        self.assertTrue(os.path.exists(self.cpath))
예제 #5
0
    def _test_pull(self):
        if os.path.exists(self.cpath):
            os.remove(self.cpath)

        self.args = self.parser.parser.parse_args(('cart pull %s' % self.cname).split())
        pulp = j(self.args)
        mute()(pulp.pull)(self.cname)

        self.assertTrue(os.path.exists(self.cpath))
예제 #6
0
 def create_test_user(self):
     args = self.parser.parser.parse_args(("user create %s --password %s --name '%s' --in %s" %
                                           (self.testuser,
                                            self.testuser,
                                            self.testuser,
                                            self._defaults['start_in'])).split())
     pulp = ja(args)
     mute()(pulp.create_user)(login=args.login, user_name=args.name, password=args.password, \
                              envs=args.envs)
예제 #7
0
    def setUp(self):
        self.parser = pmoney()
        self.aparser = pamoney()

        self.cname = 'CHG0DAY'
        self.cpath = os.path.expanduser('~/.juicer-carts/%s.json' % self.cname)
        self.rname = 'hats'

        setup_args = self.aparser.parser.parse_args(\
                ('create-repo %s --in re qa' % self.rname).split())
        pulp_admin = ja(setup_args)
        mute()(pulp_admin.create_repo)(arch=setup_args.arch,\
                repo_name=setup_args.name, envs=setup_args.envs)
예제 #8
0
    def setUp(self):
        self.parser = pmoney()
        self.aparser = pamoney()

        self.cname = TESTCART
        self.cpath = os.path.expanduser('%s/%s.json' % (Constants.CART_LOCATION, self.cname))
        self.rname = TESTREPO
        (self.connectors, self._defaults) = get_login_info()
        setup_args = self.aparser.parser.parse_args(
            ('repo create %s --in re qa' % self.rname).split())
        pulp_admin = ja(setup_args)
        mute()(pulp_admin.create_repo)(
            repo_name=setup_args.name, envs=setup_args.envs)
예제 #9
0
    def setUp(self):
        self.parser = pmoney()
        self.aparser = pamoney()

        self.cname = 'CHG0DAY'
        self.cpath = os.path.expanduser('~/.juicer-carts/%s.json' % self.cname)
        self.rname = 'hats'

        setup_args = self.aparser.parser.parse_args(\
                ('create-repo %s --in re qa' % self.rname).split())
        pulp_admin = ja(setup_args)
        mute()(pulp_admin.create_repo)(arch=setup_args.arch,\
                repo_name=setup_args.name, envs=setup_args.envs)
예제 #10
0
    def setUp(self):
        self.parser = pmoney()
        self.aparser = pamoney()

        self.cname = TESTCART
        self.cpath = os.path.expanduser('%s/%s.json' % (Constants.CART_LOCATION, self.cname))
        self.rname = TESTREPO
        (self.connectors, self._defaults) = get_login_info()
        setup_args = self.aparser.parser.parse_args(
            ('repo create %s --in re qa' % self.rname).split())
        pulp_admin = ja(setup_args)
        mute()(pulp_admin.create_repo)(
            repo_name=setup_args.name, envs=setup_args.envs)
예제 #11
0
    def test_workflow(self):
        rpm_path = './share/juicer/empty-0.0.1-1.fc17.x86_64.rpm'

        if os.path.exists(self.cpath):
            os.remove(self.cpath)

        # test uploading an rpm
        self.args = self.parser.parser.parse_args(('upload -r %s %s' % ('hats', rpm_path)).split())
        pulp = j(self.args)
        cart = pulp.create('upload-cart', self.args.r)

        self.args = self.parser.parser.parse_args('push upload-cart'.split())
        pulp = j(self.args)
        mute()(pulp.push)(cart)

        # test creating a cart
        self.args = self.parser.parser.parse_args(('create CHG0DAY -r %s %s' \
                % ('hats', rpm_path)).split())
        pulp = j(self.args)
        mute()(pulp.create)(cart_name=self.args.cartname, cart_description=self.args.r)

        # test pushing a cart
        self.args = self.parser.parser.parse_args(('create %s -r hats %s' \
                % (self.cname, rpm_path)).split())
        pulp = j(self.args)
        cart = juicer.common.Cart.Cart(self.args.cartname, autoload=True, autosync=True)
        mute()(pulp.push)(cart=cart)

        # test promoting a cart
        cart = juicer.common.Cart.Cart(self.cname, autoload=True)
        old_env = cart.current_env

        self.args = self.parser.parser.parse_args(('promote %s' % self.cname).split())
        pulp = j(self.args)
        mute()(pulp.promote)(cart_name=self.args.cartname)

        cart = juicer.common.Cart.Cart(self.cname, autoload=True)

        self.assertFalse(cart.current_env == old_env)

        # test creating a cart from manifest
        new_cname = 'CHG1DAY'

        self.args = self.parser.parser.parse_args(('create %s -f %s' \
                % (new_cname, './share/juicer/rpm-manifest.yaml')).split())
        pulp = j(self.args)
        mute()(pulp.create_manifest)(cart_name=self.args.cartname, manifests=self.args.f)

        cart = juicer.common.Cart.Cart(new_cname, autoload=True)

        self.assertFalse(cart.is_empty())
예제 #12
0
 def test_show_user(self):
     self.create_test_user()
     args = self.parser.parser.parse_args('show-user cjesop'.split())
     pulp = ja(args)
     output = mute(returns_output=True)(pulp.show_user)(login=args.login, envs=args.envs)
     self.assertTrue(any('cjesop' in k for k in output))
     self.delete_test_user()
예제 #13
0
 def test_show_repo(self):
     self.create_test_repo()
     args = self.parser.parser.parse_args('show-repo test-repo-456'.split())
     pulp = ja(args)
     output = mute(returns_output=True)(pulp.show_repo)(repo_name=args.name, envs=args.envs)
     self.assertTrue(any('test-repo-456' in k for k in output))
     self.delete_test_repo()
예제 #14
0
 def test_create_user(self):
     args = self.parser.parser.parse_args('create-user cjesop --password cjesop --name "ColonelJesop"'.split())
     pulp = ja(args)
     output = mute(returns_output=True)(pulp.create_user)(login=args.login, user_name=args.name, \
                                               password=args.password, envs=args.envs)
     self.assertTrue(any('created' in k for k in output))
     self.delete_test_user()
예제 #15
0
 def test_show_user(self):
     self.create_test_user()
     args = self.parser.parser.parse_args(("user show cjesop --in %s" % self._defaults['start_in']).split())
     pulp = ja(args)
     output = mute(returns_output=True)(pulp.show_user)(login=args.login, envs=args.envs)
     self.assertTrue(any('cjesop' in k for k in output))
     self.delete_test_user()
예제 #16
0
 def test_list_repos(self):
     self.create_test_repo()
     args = self.parser.parser.parse_args('list-repos'.split())
     pulp = ja(args)
     output = mute(returns_output=True)(pulp.list_repos)(envs=args.envs)
     self.assertTrue('test-repo-456' in output)
     self.delete_test_repo()
예제 #17
0
 def test_create_user(self):
     args = self.parser.parser.parse_args(("user create cjesop --password cjesop --name 'ColonelJesop' --in %s" % self._defaults['start_in']).split())
     pulp = ja(args)
     output = mute(returns_output=True)(pulp.create_user)(login=args.login, user_name=args.name, \
                                               password=args.password, envs=args.envs)
     self.assertTrue(any((('created' in k) or ('shares' in k)) for k in output))
     self.delete_test_user()
예제 #18
0
 def test_list_repos(self):
     self.create_test_repo()
     args = self.parser.parser.parse_args(("repo list --in %s" % self._defaults['start_in']).split())
     pulp = ja(args)
     output = mute(returns_output=True)(pulp.list_repos)(envs=args.envs)
     self.assertTrue('test-repo-456' in output)
     self.delete_test_repo()
예제 #19
0
 def test_show_repo(self):
     self.create_test_repo()
     args = self.parser.parser.parse_args(("repo show test-repo-456  --in %s" % self._defaults['start_in']).split())
     pulp = ja(args)
     output = mute(returns_output=True)(pulp.show_repo)(repo_name=args.name, envs=args.envs)
     self.assertTrue(any('test-repo-456' in k for k in output))
     self.delete_test_repo()
예제 #20
0
 def _test_delete_user(self):
     self.create_test_user()
     args = self.parser.parser.parse_args(("user delete %s --in %s" %
                                           (self.testuser,
                                            self._defaults['start_in'])).split())
     pulp = ja(args)
     output = mute(returns_output=True)(pulp.delete_user)(login=args.login, envs=args.envs)
     self.assertTrue(any('deleted' in k for k in output))
예제 #21
0
 def _test_delete_repo(self):
     self.create_test_repo()
     args = self.parser.parser.parse_args(("repo delete %s --in %s" %
                                           (self.testrepo,
                                            self._defaults['start_in'])).split())
     pulp = ja(args)
     output = mute(returns_output=True)(pulp.delete_repo)(repo_name=args.name, envs=args.envs)
     self.assertTrue(any('deleted' in k for k in output))
예제 #22
0
 def test_role_add(self):
     self.create_test_user()
     args = self.parser.parser.parse_args('role-add --login cjesop \
             --role super-users'.split())
     pulp = ja(args)
     output = mute(returns_output=True)(pulp.role_add)(role=args.role, login=args.login, envs=args.envs)
     self.assertTrue(any('added' in k for k in output))
     self.delete_test_user()
예제 #23
0
 def _test_create_repo(self):
     args = self.parser.parser.parse_args(("repo create %s --in %s" %
                                           (self.testrepo,
                                            self._defaults['start_in'])).split())
     pulp = ja(args)
     output = mute(returns_output=True)(pulp.create_repo)(repo_name=args.name, envs=args.envs)
     self.assertTrue(any('created' in k for k in output), msg="'created' not in output: %s" %
                     juicer.utils.create_json_str(output, indent=4, cls=juicer.common.Repo.RepoEncoder))
     self.delete_test_repo()
예제 #24
0
 def _test_role_add(self):
     self.create_test_user()
     args = self.parser.parser.parse_args(("role add --login %s --role super-users --in %s" %
                                           (self.testuser,
                                            self._defaults['start_in'])).split())
     pulp = ja(args)
     output = mute(returns_output=True)(pulp.role_add)(role=args.role, login=args.login, envs=args.envs)
     self.assertTrue(any('added' in k for k in output))
     self.delete_test_user()
예제 #25
0
 def _test_create_user(self):
     args = self.parser.parser.parse_args(("user create %s --password %s --name '%s' --in %s" %
                                           (self.testuser,
                                            self.testuser,
                                            self.testuser,
                                            self._defaults['start_in'])).split())
     pulp = ja(args)
     output = mute(returns_output=True)(pulp.create_user)(login=args.login, user_name=args.name, \
                                                          password=args.password, envs=args.envs)
     self.assertTrue(any((('created' in k) or ('shares' in k)) for k in output))
     self.delete_test_user()
예제 #26
0
 def _test_list_repos(self):
     self.create_test_repo()
     env = self._defaults['start_in']
     args = self.parser.parser.parse_args(("repo list --in %s" % env).split())
     pulp = ja(args)
     output = mute()(pulp.list_repos)(envs=args.envs)
     env_output = output[env]
     self.assertTrue(self.testrepo in env_output, msg="Expected to find %s in output: %s" %
                     (self.testrepo,
                      juicer.utils.create_json_str(output, indent=4, cls=juicer.common.Repo.RepoEncoder)))
     self.delete_test_repo()
예제 #27
0
 def _test_show_repo(self):
     self.create_test_repo()
     env = self._defaults['start_in']
     args = self.parser.parser.parse_args(("repo show %s --in %s" %
                                           (self.testrepo,
                                            env)).split())
     pulp = ja(args)
     output = mute()(pulp.show_repo)(repo_names=args.name, envs=args.envs)
     env_output = output[env][0]
     self.assertEqual(self.testrepo, env_output['name'], msg="Expected to see %s in %s" %
                      (self.testrepo,
                       juicer.utils.create_json_str(env_output, indent=4, cls=juicer.common.Repo.RepoEncoder)))
     self.delete_test_repo()
예제 #28
0
 def delete_test_repo(self):
     args = self.parser.parser.parse_args(("repo delete %s --in %s" %
                                           (self.testrepo,
                                            self._defaults['start_in'])).split())
     pulp = ja(args)
     mute()(pulp.delete_repo)(repo_name=args.name, envs=args.envs)
예제 #29
0
 def _test_show(self):
     self.args = self.parser.parser.parse_args(('cart show %s' % self.cname).split())
     pulp = j(self.args)
     mute()(pulp.show)(self.cname, get_environments())
예제 #30
0
 def test_hello(self):
     self.args = self.parser.parser.parse_args('hello'.split())
     pulp = j(self.args)
     mute()(pulp.hello)()
예제 #31
0
 def test_show(self):
     self.args = self.parser.parser.parse_args(('show %s' % self.cname).split())
     pulp = j(self.args)
     mute()(pulp.show)(self.cname)
예제 #32
0
 def test_show(self):
     self.args = self.parser.parser.parse_args(
         ('show %s' % self.cname).split())
     pulp = j(self.args)
     mute()(pulp.show)(self.cname)
예제 #33
0
    def test_workflow(self):
        rpm_path = './share/juicer/empty-0.0.1-1.fc17.x86_64.rpm'

        if os.path.exists(self.cpath):
            os.remove(self.cpath)

        # test uploading an rpm
        self.args = self.parser.parser.parse_args(\
                ('upload -r %s %s' % (self.rname, rpm_path)).split())
        pulp = j(self.args)
        cart = pulp.create('upload-cart', self.args.r)

        self.args = self.parser.parser.parse_args('push upload-cart'.split())
        pulp = j(self.args)
        mute()(pulp.push)(cart)

        # test searching for an rpm
        self.args = self.parser.parser.parse_args('search %s'.split())
        pulp = j(self.args)
        mute()(pulp.search)(pkg_name=self.args.rpmname)

        self.args = self.parser.parser.parse_args(\
            'search %s --in re'.split())
        pulp = j(self.args)
        mute()(pulp.search)(pkg_name=self.args.rpmname)

        # test creating a cart
        self.args = self.parser.parser.parse_args(('create CHG0DAY -r %s %s' \
                % ('hats', rpm_path)).split())
        pulp = j(self.args)
        mute()(pulp.create)(cart_name=self.args.cartname,
                            cart_description=self.args.r)

        # test pushing a cart
        self.args = self.parser.parser.parse_args(('create %s -r hats %s' \
                % (self.cname, rpm_path)).split())
        pulp = j(self.args)
        cart = juicer.common.Cart.Cart(self.args.cartname,
                                       autoload=True,
                                       autosync=True)
        mute()(pulp.push)(cart=cart)

        # test promoting a cart
        cart = juicer.common.Cart.Cart(self.cname, autoload=True)
        old_env = cart.current_env

        self.args = self.parser.parser.parse_args(
            ('promote %s' % self.cname).split())
        pulp = j(self.args)
        mute()(pulp.promote)(cart_name=self.args.cartname)

        cart = juicer.common.Cart.Cart(self.cname, autoload=True)

        self.assertFalse(cart.current_env == old_env)

        # test creating a cart from manifest
        new_cname = 'CHG1DAY'

        self.args = self.parser.parser.parse_args(('create %s -f %s' \
                % (new_cname, './share/juicer/rpm-manifest.yaml')).split())
        pulp = j(self.args)
        mute()(pulp.create_manifest)(cart_name=self.args.cartname,
                                     manifests=self.args.f)

        cart = juicer.common.Cart.Cart(new_cname, autoload=True)

        self.assertFalse(cart.is_empty())
예제 #34
0
 def delete_test_user(self):
     args = self.parser.parser.parse_args('delete-user cjesop'.split())
     pulp = ja(args)
     mute()(pulp.delete_user)(login=args.login, envs=args.envs)
예제 #35
0
    def _test_workflow(self):
        rpm_path = '../../share/juicer/empty-0.1-1.noarch.rpm'
        rpm2_path = '../../share/juicer/alsoempty-0.1-1.noarch.rpm'

        if os.path.exists(self.cpath):
            os.remove(self.cpath)

        # test uploading an rpm
        self.args = self.parser.parser.parse_args(
            ('rpm upload -r %s %s' % (self.rname, rpm_path)).split())
        pulp = j(self.args)
        cart = pulp.create('upload-cart', self.args.r)

        self.args = self.parser.parser.parse_args(
            'cart push upload-cart'.split())
        pulp = j(self.args)
        mute()(pulp.push)(cart)

        # test searching for an rpm
        self.args = self.parser.parser.parse_args('rpm search %s'.split())
        pulp = j(self.args)
        mute()(pulp.search)(pkg_name=self.args.rpmname)

        self.args = self.parser.parser.parse_args(
            'rpm search %s --in re'.split())
        pulp = j(self.args)
        mute()(pulp.search)(pkg_name=self.args.rpmname)

        # test creating a cart
        self.args = self.parser.parser.parse_args(
            ('cart create %s -r %s %s %s' %
             (self.cname, self.rname, rpm_path, rpm2_path)).split())
        pulp = j(self.args)
        mute()(pulp.create)(cart_name=self.args.cartname,
                            cart_description=self.args.r)

        # test pushing a cart
        self.args = self.parser.parser.parse_args(
            ('cart create %s -r %s %s' %
             (self.cname, self.rname, rpm_path)).split())
        pulp = j(self.args)
        cart = juicer.common.Cart.Cart(self.args.cartname,
                                       autoload=True,
                                       autosync=True)
        mute()(pulp.push)(cart=cart)

        # test promoting a cart
        cart = juicer.common.Cart.Cart(self.cname, autoload=True)
        old_env = cart.current_env

        self.args = self.parser.parser.parse_args(
            ('cart promote %s' % self.cname).split())
        pulp = j(self.args)
        mute()(pulp.promote)(cart_name=self.args.cartname)

        cart = juicer.common.Cart.Cart(self.cname, autoload=True)

        self.assertFalse(cart.current_env == old_env)

        # test creating a cart from manifest
        new_cname = self.cname + "1"

        self.args = self.parser.parser.parse_args(
            ('cart create %s -f %s' %
             (new_cname, '../../share/juicer/rpm-manifest.yaml')).split())
        pulp = j(self.args)
        mute()(pulp.create_manifest)(cart_name=self.args.cartname,
                                     manifests=self.args.f)

        cart = juicer.common.Cart.Cart(new_cname, autoload=True)

        self.assertFalse(cart.is_empty())

        # test deleting a cart
        self.args = self.parser.parser.parse_args(('cart delete %s' % \
                                        (self.cname)).split())
        pulp = j(self.args)

        mute()(pulp.delete)(cartname=cart.cart_name)
        self.assertFalse(os.path.exists(cart.cart_file()))

        cart = juicer.common.Cart.Cart(self.cname, autoload=True)
        mute()(pulp.delete)(cartname=cart.cart_name)
        self.assertFalse(os.path.exists(cart.cart_file()))
예제 #36
0
 def test_create_repo(self):
     args = self.parser.parser.parse_args('create-repo test-repo-456'.split())
     pulp = ja(args)
     output = mute(returns_output=True)(pulp.create_repo)(arch=args.arch, repo_name=args.name, envs=args.envs)
     self.assertTrue(any('created' in k for k in output))
     self.delete_test_repo()
예제 #37
0
 def test_list_roles(self):
     args = self.parser.parser.parse_args('list-roles'.split())
     pulp = ja(args)
     output = mute(returns_output=True)(pulp.list_roles)(envs=args.envs)
     self.assertTrue(any('super-users' in k for k in output))
예제 #38
0
 def delete_test_repo(self):
     args = self.parser.parser.parse_args('delete-repo test-repo-456'.split())
     pulp = ja(args)
     mute()(pulp.delete_repo)(repo_name=args.name, envs=args.envs)
예제 #39
0
 def create_test_repo(self):
     args = self.parser.parser.parse_args('create-repo test-repo-456'.split())
     pulp = ja(args)
     mute()(pulp.create_repo)(arch=args.arch, repo_name=args.name, envs=args.envs)
예제 #40
0
 def _test_hello(self):
     self.args = self.parser.parser.parse_args(("hello --in %s" % self._defaults['start_in']).split())
     pulp = j(self.args)
     mute()(pulp.hello)()
예제 #41
0
 def test_hello(self):
     self.args = self.parser.parser.parse_args('hello'.split())
     pulp = j(self.args)
     mute()(pulp.hello)()
예제 #42
0
 def _test_show(self):
     self.args = self.parser.parser.parse_args(
         ('cart show %s' % self.cname).split())
     pulp = j(self.args)
     mute()(pulp.show)(self.cname, get_environments())
예제 #43
0
 def create_test_user(self):
     args = self.parser.parser.parse_args('create-user cjesop --password cjesop --name "ColonelJesop"'.split())
     pulp = ja(args)
     mute()(pulp.create_user)(login=args.login, user_name=args.name, password=args.password, \
                                  envs=args.envs)
예제 #44
0
    def _test_workflow(self):
        rpm_path = '../../share/juicer/empty-0.1-1.noarch.rpm'
        rpm2_path = '../../share/juicer/alsoempty-0.1-1.noarch.rpm'

        if os.path.exists(self.cpath):
            os.remove(self.cpath)

        # test uploading an rpm
        self.args = self.parser.parser.parse_args(
            ('rpm upload -r %s %s' % (self.rname, rpm_path)).split())
        pulp = j(self.args)
        cart = pulp.create('upload-cart', self.args.r)

        self.args = self.parser.parser.parse_args('cart push upload-cart'.split())
        pulp = j(self.args)
        mute()(pulp.push)(cart)

        # test searching for an rpm
        self.args = self.parser.parser.parse_args('rpm search %s'.split())
        pulp = j(self.args)
        mute()(pulp.search)(pkg_name=self.args.rpmname)

        self.args = self.parser.parser.parse_args(
            'rpm search %s --in re'.split())
        pulp = j(self.args)
        mute()(pulp.search)(pkg_name=self.args.rpmname)

        # test creating a cart
        self.args = self.parser.parser.parse_args(('cart create %s -r %s %s %s' %
                                                   (self.cname,
                                                    self.rname,
                                                    rpm_path,
                                                    rpm2_path)).split())
        pulp = j(self.args)
        mute()(pulp.create)(cart_name=self.args.cartname, cart_description=self.args.r)

        # test pushing a cart
        self.args = self.parser.parser.parse_args(('cart create %s -r %s %s' %
                                                   (self.cname,
                                                    self.rname,
                                                    rpm_path)).split())
        pulp = j(self.args)
        cart = juicer.common.Cart.Cart(self.args.cartname, autoload=True, autosync=True)
        mute()(pulp.push)(cart=cart)

        # test promoting a cart
        cart = juicer.common.Cart.Cart(self.cname, autoload=True)
        old_env = cart.current_env

        self.args = self.parser.parser.parse_args(('cart promote %s' % self.cname).split())
        pulp = j(self.args)
        mute()(pulp.promote)(cart_name=self.args.cartname)

        cart = juicer.common.Cart.Cart(self.cname, autoload=True)

        self.assertFalse(cart.current_env == old_env)

        # test creating a cart from manifest
        new_cname = self.cname + "1"

        self.args = self.parser.parser.parse_args(('cart create %s -f %s' %
                                                   (new_cname, '../../share/juicer/rpm-manifest.yaml')).split())
        pulp = j(self.args)
        mute()(pulp.create_manifest)(cart_name=self.args.cartname, manifests=self.args.f)

        cart = juicer.common.Cart.Cart(new_cname, autoload=True)

        self.assertFalse(cart.is_empty())

        # test deleting a cart
        self.args = self.parser.parser.parse_args(('cart delete %s' % \
                                        (self.cname)).split())
        pulp = j(self.args)

        mute()(pulp.delete)(cartname=cart.cart_name)
        self.assertFalse(os.path.exists(cart.cart_file()))

        cart = juicer.common.Cart.Cart(self.cname, autoload=True)
        mute()(pulp.delete)(cartname=cart.cart_name)
        self.assertFalse(os.path.exists(cart.cart_file()))
예제 #45
0
 def _test_hello(self):
     self.args = self.parser.parser.parse_args(
         ("hello --in %s" % self._defaults['start_in']).split())
     pulp = j(self.args)
     mute()(pulp.hello)()