diff --git a/README.md b/README.md index 3ef1f263c4856cfe23c8a87e2b0ad21bd2b86d87..f434688cbfde194d36cb95119758d4daa688b2d7 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/tests/unit/money/test_quantitative_zsum.py b/tests/unit/money/test_quantitative_zsum.py index d2531559bfd165e3edd5462596ece567fbdb4b37..185113fa5ce7ec1cabcda529cf7b08972d75f467 100644 --- a/tests/unit/money/test_quantitative_zsum.py +++ b/tests/unit/money/test_quantitative_zsum.py @@ -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): diff --git a/tests/unit/money/test_relative_zsum.py b/tests/unit/money/test_relative_zsum.py index d0d1279f13acd4b562f9f414265f4f5ca606866b..f24268fb1ad5cafaef3ec8f622af6da17f25a2a2 100644 --- a/tests/unit/money/test_relative_zsum.py +++ b/tests/unit/money/test_relative_zsum.py @@ -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):