예제 #1
0
    def test_format_sellable_description(self):
        sellable = self.create_sellable()
        sellable.description = u"Cellphone"
        self.assertEqual(format_sellable_description(sellable), u"Cellphone")

        storable = self.create_storable(product=sellable.product)
        batch = self.create_storable_batch(storable=storable,
                                           batch_number=u'666')
        self.assertEqual(format_sellable_description(sellable, batch=batch),
                         u"Cellphone [Batch: 666]")
예제 #2
0
    def test_format_sellable_description(self):
        sellable = self.create_sellable()
        sellable.description = u"Cellphone"
        self.assertEqual(format_sellable_description(sellable),
                         u"Cellphone")

        storable = self.create_storable(product=sellable.product)
        batch = self.create_storable_batch(storable=storable,
                                           batch_number=u'666')
        self.assertEqual(format_sellable_description(sellable, batch=batch),
                         u"Cellphone [Batch: 666]")
예제 #3
0
 def _format_description(self, item, data):
     return format_sellable_description(item.product.sellable, item.batch)
예제 #4
0
 def _format_description(self, item, data):
     return format_sellable_description(item.sellable, item.batch)
예제 #5
0
 def description(self):
     return format_sellable_description(self.sellable, self.batch)
예제 #6
0
 def _format_description(self, item, data):  # pragma no cover
     return format_sellable_description(item.sellable, item.batch)
예제 #7
0
파일: pos.py 프로젝트: rosalin/stoq
 def full_description(self):
     return format_sellable_description(self.sellable, self.batch)
예제 #8
0
 def _format_description(self, item, data):  # pragma no cover
     return format_sellable_description(item.sellable, item.batch)