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