Exemple #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, {})
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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, {})
Exemple #7
0
 def run(self):
     cart = Cart(self.args.cartname)
     cart.delete()
     Log.log_info("successfully deleted cart %s" % cart.name)
Exemple #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])
Exemple #9
0
 def run(self):
     cart = Cart(self.args.cartname, autoload=True)
     Log.log_info(str(cart))
Exemple #10
0
 def run(self):
     cart = Cart(self.args.cartname,
                 autoload=False,
                 autosave=False,
                 autosync=False)
     cart.pull()
Exemple #11
0
 def run(self):
     cart = Cart(self.args.cartname)
     cart.delete()
     self.output.info("successfully deleted cart %s" % cart.name)
Exemple #12
0
 def run(self):
     Cart(self.args.cartname, self.args.r, autosave=True)
Exemple #13
0
 def run(self):
     cart = Cart(self.args.cartname, autoload=True)
     cart.update(self.args.r)
Exemple #14
0
 def run(self):
     cart = Cart(self.args.cartname, autoload=True)
     self.output.info(str(cart))
Exemple #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, {})