Ejemplo n.º 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]")
Ejemplo n.º 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]")
Ejemplo n.º 3
0
 def _format_description(self, item, data):
     return format_sellable_description(item.product.sellable, item.batch)
Ejemplo n.º 4
0
 def _format_description(self, item, data):
     return format_sellable_description(item.sellable, item.batch)
Ejemplo n.º 5
0
 def description(self):
     return format_sellable_description(self.sellable, self.batch)
Ejemplo n.º 6
0
 def _format_description(self, item, data):  # pragma no cover
     return format_sellable_description(item.sellable, item.batch)
Ejemplo n.º 7
0
Archivo: pos.py Proyecto: rosalin/stoq
 def full_description(self):
     return format_sellable_description(self.sellable, self.batch)
Ejemplo n.º 8
0
 def _format_description(self, item, data):  # pragma no cover
     return format_sellable_description(item.sellable, item.batch)