Commit 435c22b6 authored by Vincent Texier's avatar Vincent Texier

[fix] #807 fix unit tests and README.md

parent 49a54327
......@@ -103,10 +103,11 @@ make check
```bash
make tests
```
> **Warning:** *do not run tests with sakia installed in your dev environment, because pytest will use the installed Sakia.*
* Run only some unit tests by passing a special ENV variable:
```bash
make tests TESTS_FILTER=tests.documents.test_block.TestBlock.test_fromraw
make tests TESTS_FILTER=tests/functional/test_transfer_dialog.py::test_transfer
```
## Packaging and deploy
......
......@@ -6,7 +6,7 @@ def test_value(application_with_one_connection, bob):
110, bob.currency, application_with_one_connection, None
)
value = referential.value()
assert value == -10.79
assert value == 1.1
def test_differential(application_with_one_connection, bob):
......@@ -14,7 +14,7 @@ def test_differential(application_with_one_connection, bob):
110, bob.currency, application_with_one_connection, None
)
value = referential.value()
assert value == -10.79
assert value == 1.1
def test_localized_no_si(application_with_one_connection, bob):
......@@ -22,7 +22,7 @@ def test_localized_no_si(application_with_one_connection, bob):
110, bob.currency, application_with_one_connection, None
)
value = referential.localized(units=True)
assert value == "-10.79 Q0"
assert value == "1.10 Q0"
def test_localized_with_si(application_with_one_connection, bob):
......@@ -31,7 +31,7 @@ def test_localized_with_si(application_with_one_connection, bob):
110 * 1000, bob.currency, application_with_one_connection, None
)
value = referential.localized(units=True, show_base=True)
assert value == "1,088.11 Q0"
assert value == "1,100.00 Q0"
def test_localized_no_units_no_si(application_with_one_connection, bob):
......@@ -40,7 +40,7 @@ def test_localized_no_units_no_si(application_with_one_connection, bob):
110, bob.currency, application_with_one_connection, None
)
value = referential.localized(units=False, show_base=False)
assert value == "-10.79"
assert value == "1.10"
def test_localized_no_units_with_si(application_with_one_connection, bob):
......@@ -49,7 +49,7 @@ def test_localized_no_units_with_si(application_with_one_connection, bob):
110 * 1000, bob.currency, application_with_one_connection, None
)
value = referential.localized(units=False, show_base=True)
assert value == "1,088.11"
assert value == "1,100.00"
def test_diff_localized_no_si(application_with_one_connection, bob):
......
......@@ -7,19 +7,19 @@ def test_value(application_with_one_connection, bob):
2702, bob.currency, application_with_one_connection, None
)
value = referential.value()
assert value == approx(8.70007)
assert value == approx(2702)
def test_differential(application_with_one_connection, bob):
referential = RelativeZSum(111, bob.currency, application_with_one_connection, None)
value = referential.value()
assert value == approx(-3.521619496)
assert value == approx(111)
def test_localized_no_si(application_with_one_connection, bob):
referential = RelativeZSum(110, bob.currency, application_with_one_connection, None)
value = referential.localized(units=True)
assert value == "-3.53 R0 UD"
assert value == "110.00 R0 UD"
def test_localized_with_si(application_with_one_connection, bob):
......@@ -27,7 +27,7 @@ def test_localized_with_si(application_with_one_connection, bob):
referential = RelativeZSum(1, bob.currency, application_with_one_connection, None)
value = referential.localized(units=True, show_base=True)
assert value == "-4.040487 R0 UD"
assert value == "1.000000 R0 UD"
def test_localized_no_units_no_si(application_with_one_connection, bob):
......@@ -35,7 +35,7 @@ def test_localized_no_units_no_si(application_with_one_connection, bob):
referential = RelativeZSum(110, bob.currency, application_with_one_connection, None)
value = referential.localized(units=False, show_base=False)
assert value == "-3.526336"
assert value == "110.000000"
def test_localized_no_units_with_si(application_with_one_connection, bob):
......@@ -43,7 +43,7 @@ def test_localized_no_units_with_si(application_with_one_connection, bob):
referential = RelativeZSum(1, bob.currency, application_with_one_connection, None)
value = referential.localized(units=False, show_base=True)
assert value == "-4.040487"
assert value == "1.000000"
def test_diff_localized_no_si(application_with_one_connection, bob):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment