Esempio n. 1
0
 def test_cart_without_provided_description(self):
     """A cart without items is empty"""
     with mock.patch('juicer.common.Constants') as constants:
         constants.USER_CONFIG = './config'
         cart = Cart('test-cart')
         self.assertEqual(cart.is_empty(), True)
         self.assertEqual(cart.repo_items_hash, {})
Esempio n. 2
0
 def test_cart_with_provided_description(self):
     """A cart with items is not empty"""
     cart = Cart('test-cart', [['test-repo', 'share/juicer/empty-0.1-1.noarch.rpm']])
     self.assertEqual(cart.repos(), ['test-repo'])
     self.assertEqual(cart.keys(), ['test-repo'])
     self.assertEqual(cart.is_empty(), False)
     self.assertIsInstance(str(cart), str)
Esempio n. 3
0
 def test_cart_with_provided_description(self):
     """A cart with items is not empty"""
     cart = Cart('test-cart',
                 [['test-repo', 'share/juicer/empty-0.1-1.noarch.rpm']])
     self.assertEqual(cart.repos(), ['test-repo'])
     self.assertEqual(cart.keys(), ['test-repo'])
     self.assertEqual(cart.is_empty(), False)
     self.assertIsInstance(str(cart), str)
Esempio n. 4
0
 def run(self):
     cart = Cart(self.args.cartname,
                 autoload=True,
                 autosave=True,
                 autosync=False)
     for environment in self.args.environment:
         cart.upload_items(environment, self.connections[environment],
                           self.args.f)
Esempio n. 5
0
 def test_cart_with_provided_description(self):
     """A cart with items is not empty"""
     with mock.patch('juicer.common.Constants') as constants:
         constants.USER_CONFIG = './config'
         cart = Cart('test-cart', [['test-repo', 'share/juicer/empty-0.1-1.noarch.rpm']])
         self.assertEqual(cart.repos(), ['test-repo'])
         self.assertEqual(cart.keys(), ['test-repo'])
         self.assertEqual(cart.is_empty(), False)
         self.assertIsInstance(str(cart), str)
Esempio n. 6
0
 def test_cart_without_provided_description(self):
     """A cart without items is empty"""
     cart = Cart('test-cart')
     self.assertEqual(cart.is_empty(), True)
     self.assertEqual(cart.repo_items_hash, {})
Esempio n. 7
0
 def run(self):
     cart = Cart(self.args.cartname)
     cart.delete()
     Log.log_info("successfully deleted cart %s" % cart.name)
Esempio n. 8
0
 def run(self):
     for environment in self.args.environment:
         Log.log_info("Starting upload for %s environment" % environment)
         cart = Cart('upload-cart', self.args.r)
         cart.upload_items(environment, self.connections[environment])
Esempio n. 9
0
 def run(self):
     cart = Cart(self.args.cartname, autoload=True)
     Log.log_info(str(cart))
Esempio n. 10
0
 def run(self):
     cart = Cart(self.args.cartname,
                 autoload=False,
                 autosave=False,
                 autosync=False)
     cart.pull()
Esempio n. 11
0
 def run(self):
     cart = Cart(self.args.cartname)
     cart.delete()
     self.output.info("successfully deleted cart %s" % cart.name)
Esempio n. 12
0
 def run(self):
     Cart(self.args.cartname, self.args.r, autosave=True)
Esempio n. 13
0
 def run(self):
     cart = Cart(self.args.cartname, autoload=True)
     cart.update(self.args.r)
Esempio n. 14
0
 def run(self):
     cart = Cart(self.args.cartname, autoload=True)
     self.output.info(str(cart))
Esempio n. 15
0
 def test_cart_without_provided_description(self):
     """A cart without items is empty"""
     cart = Cart('test-cart')
     self.assertEqual(cart.is_empty(), True)
     self.assertEqual(cart.repo_items_hash, {})