facho: Amount nueva clase para gestion moneda.
facho/fe/form_xml(DIANInvoiceXML): se extrae de form.py para resolver ciclo en dependencias. facho/fe/form.py(Amount): clase para gestion de moneda. test/: se actualizan para hacer uso de Amount. FossilOrigin-Name: 714687a7a825715d272392d361de5e42d7c25d6078ec68a81df653f8843c37a3
This commit is contained in:
18
tests/test_amount.py
Normal file
18
tests/test_amount.py
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# This file is part of facho. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
|
||||
"""Tests for `facho` package."""
|
||||
|
||||
import pytest
|
||||
|
||||
import facho.fe.form as form
|
||||
|
||||
|
||||
def test_amount_equals():
|
||||
price1 = form.Amount(110.0)
|
||||
price2 = form.Amount(100 + 10.0)
|
||||
assert price1 == price2
|
||||
assert price1 == form.Amount(100) + form.Amount(10)
|
||||
assert price1 == form.Amount(10) * form.Amount(10) + form.Amount(10)
|
||||
Reference in New Issue
Block a user