예제 #1
0
 def setUp(self):
     # make a product
     item = TestSimpleProduct()
     item.price = Decimal("199.99")
     item.title = 'Test Product'
     item.save()
     self.item = item
     # 
     item2 = TestSimpleProduct()
     item2.price = Decimal("9.99")
     item2.title = 'Another Product'
     item2.save()
     self.item2 = item2
     # get the basket
     r = self.client.get(reverse('basky:basket'))
     self.basket = self.client.session['basket']
예제 #2
0
 def setUp(self):
     # make a product
     item = TestSimpleProduct()
     item.price = Decimal("199.99")
     item.title = 'Yamaha Manu Katché Signature Junior Hip Gig Kit in Black'
     item.description = "Manu Katché famous for playing drums for the likes of Peter Gabriel and Sting announced to Yamaha \"Why don't you make a real drum kit for kids?\" The design team for Yamaha got to work and here are the results. A fantastic Philippine mahogany shell drum kit that delivers a loud, warm and an open tone. The bass drum is made from 9 ply while the toms and snare drum are made up from 6-ply. Each ply is laminated together using the exclusive Air Seal System ensuring that every shell is a uniform thickness. Finished off with a tough and very durable lacquer. This is an ideal drum kit for a beginner to the professional. Due to its sizes this drum kit can fit into most rooms without taking up too much room making this a perfect compact portable/practice drum kit"
     item.save()
     self.item = item
     # get the basket
     r = self.client.get(reverse('basky:basket'))
     self.basket = self.client.session['basket']
예제 #3
0
 def setUp(self):
     # make a product
     item = TestSimpleProduct()
     item.price = Decimal("199.99")
     item.title = 'Test Product'
     item.save()
     self.item = item
     # 
     item2 = TestSimpleProduct()
     item2.price = Decimal("9.99")
     item2.title = 'Another Product'
     item2.save()
     self.item2 = item2
     # get the ctype
     self.ctype = ContentType.objects.get(
                 app_label=self.item._meta.app_label,
                 model=self.item._meta.object_name.lower())
     # get the basket
     self.client.get(reverse('basky:basket'))
     self.basket = self.client.session['basket']
예제 #4
0
 def setUp(self):
     # create a simple product
     item = TestSimpleProduct()
     item.price = Decimal("9.99")
     item.title = 'Another Product'
     item.save()
     self.item = item
     # get the ctype
     self.ctype = ContentType.objects.get(
         app_label=self.item._meta.app_label,
         model=self.item._meta.object_name.lower())
     # get the basket
     self.client.get('/')
     self.basket = self.client.session['basket']
예제 #5
0
 def setUp(self):
     # set up the test list as empty dict
     global test_dict
     test_dict = {}
     # define a product to use
     item = TestSimpleProduct()
     item.price = Decimal("199.99")
     item.title = 'Test Product'
     item.save()
     self.item = item
     # get the basket
     r = self.client.get(reverse('basky:basket'))
     self.basket = self.client.session['basket']
     # delete cache
     self.basket._delete_cache()
 def setUp(self):
     # create a product to use
     item = TestSimpleProduct()
     item.price = Decimal("199.99")
     item.title = 'Test Product'
     item.save()
     self.item = item
     # get the ctype
     self.ctype = ContentType.objects.get(
         app_label=self.item._meta.app_label,
         model=self.item._meta.object_name.lower())
     # get a basket
     r = self.client.get(reverse('basky:basket'))
     # request factory
     self.factory = RequestFactory()