Exemplo n.º 1
0
    def test_ens_get_capital_social(self):
        self.assertEqual("-", get_capital_social(Mock(capital_social_sn=None)))

        self.assertEqual(_(u"No"), get_capital_social(Mock(capital_social_sn=False)))

        self.assertEqual(_(u"Sí"), get_capital_social(Mock(capital_social_sn=True, capital_social_import=None)))

        self.assertEqual(
            _(u"2.00"),
            get_capital_social(Mock(capital_social_sn=True, capital_social_import=2, capital_social_moneda=None)),
        )

        self.assertEqual(
            u"2.00 €/any",
            get_capital_social(Mock(capital_social_sn=True, capital_social_import=2, capital_social_moneda=u"€/any")),
        )

        self.assertEqual(
            u"2.35 €/any",
            get_capital_social(
                Mock(capital_social_sn=True, capital_social_import=2.35, capital_social_moneda=u"€/any")
            ),
        )
Exemplo n.º 2
0
 def capital_social(self):
     return get_capital_social(self.context)