diff --git a/src/sakia/tests/unit/core/money/test_relative.py b/src/sakia/tests/unit/core/money/test_relative.py index 1791fb3ed1bdfef8ef9de254a4f6f23ef67206b9..ae542b05ae8f5f4110dfebd8370ed67297342b46 100644 --- a/src/sakia/tests/unit/core/money/test_relative.py +++ b/src/sakia/tests/unit/core/money/test_relative.py @@ -64,7 +64,7 @@ class TestRelative(unittest.TestCase, QuamashTest): @patch('sakia.core.Community') @patch('sakia.core.Application') def test_localized_with_si(self, app, community): - community.dividend = CoroutineMock(return_value=10000) + community.dividend = CoroutineMock(return_value=1000000) type(community).short_currency = PropertyMock(return_value="TC") app.preferences = { 'digits_after_comma': 6 @@ -72,7 +72,7 @@ class TestRelative(unittest.TestCase, QuamashTest): referential = Relative(1011, community, app, None) async def exec_test(): value = await referential.localized(units=True, international_system=True) - self.assertEqual(value, "1.011000 dUD TC") + self.assertEqual(value, "1.011000 mUD TC") self.lp.run_until_complete(exec_test()) @patch('sakia.core.Community') @@ -92,7 +92,7 @@ class TestRelative(unittest.TestCase, QuamashTest): @patch('sakia.core.Community') @patch('sakia.core.Application') def test_localized_no_units_with_si(self, app, community): - community.dividend = CoroutineMock(return_value=10000) + community.dividend = CoroutineMock(return_value=1000000) type(community).short_currency = PropertyMock(return_value="TC") app.preferences = { 'digits_after_comma': 6 @@ -100,7 +100,7 @@ class TestRelative(unittest.TestCase, QuamashTest): referential = Relative(1011, community, app, None) async def exec_test(): value = await referential.localized(units=False, international_system=True) - self.assertEqual(value, "1.011000 dUD ") + self.assertEqual(value, "1.011000 mUD ") self.lp.run_until_complete(exec_test()) @patch('sakia.core.Community') @@ -120,7 +120,7 @@ class TestRelative(unittest.TestCase, QuamashTest): @patch('sakia.core.Community') @patch('sakia.core.Application') def test_diff_localized_with_si(self, app, community): - community.dividend = CoroutineMock(return_value=10000) + community.dividend = CoroutineMock(return_value=1000000) type(community).short_currency = PropertyMock(return_value="TC") app.preferences = { 'digits_after_comma': 6 @@ -128,13 +128,13 @@ class TestRelative(unittest.TestCase, QuamashTest): referential = Relative(1011, community, app, None) async def exec_test(): value = await referential.diff_localized(units=True, international_system=True) - self.assertEqual(value, "1.011000 dUD TC") + self.assertEqual(value, "1.011000 mUD TC") self.lp.run_until_complete(exec_test()) @patch('sakia.core.Community') @patch('sakia.core.Application') def test_diff_localized_no_units_no_si(self, app, community): - community.dividend = CoroutineMock(return_value=10000) + community.dividend = CoroutineMock(return_value=1000000) type(community).short_currency = PropertyMock(return_value="TC") app.preferences = { 'digits_after_comma': 6 @@ -142,13 +142,13 @@ class TestRelative(unittest.TestCase, QuamashTest): referential = Relative(1011, community, app, None) async def exec_test(): value = await referential.diff_localized(units=False, international_system=False) - self.assertEqual(value, "0.101100") + self.assertEqual(value, "0.001011") self.lp.run_until_complete(exec_test()) @patch('sakia.core.Community') @patch('sakia.core.Application') def test_diff_localized_no_units_with_si(self, app, community): - community.dividend = CoroutineMock(return_value=10000) + community.dividend = CoroutineMock(return_value=1000000) type(community).short_currency = PropertyMock(return_value="TC") app.preferences = { 'digits_after_comma': 6 @@ -156,5 +156,5 @@ class TestRelative(unittest.TestCase, QuamashTest): referential = Relative(1011, community, app, None) async def exec_test(): value = await referential.diff_localized(units=False, international_system=True) - self.assertEqual(value, "1.011000 dUD ") + self.assertEqual(value, "1.011000 mUD ") self.lp.run_until_complete(exec_test()) \ No newline at end of file diff --git a/src/sakia/tests/unit/core/money/test_relative_to_past.py b/src/sakia/tests/unit/core/money/test_relative_to_past.py index 1ad2cb740df151338e3c5d245fa8230013e21090..0a0f5e2d83b6512d01d745b1e66bdfb66d9342f5 100644 --- a/src/sakia/tests/unit/core/money/test_relative_to_past.py +++ b/src/sakia/tests/unit/core/money/test_relative_to_past.py @@ -69,7 +69,7 @@ class TestRelativeToPast(unittest.TestCase, QuamashTest): @patch('sakia.core.Community') @patch('sakia.core.Application') def test_localized_with_si(self, app, community): - community.dividend = CoroutineMock(return_value=10000) + community.dividend = CoroutineMock(return_value=1000000) community.get_block = CoroutineMock(return_value={'medianTime': 1452663088792}) type(community).short_currency = PropertyMock(return_value="TC") app.preferences = { @@ -78,7 +78,7 @@ class TestRelativeToPast(unittest.TestCase, QuamashTest): referential = RelativeToPast(1011, community, app, 100) async def exec_test(): value = await referential.localized(units=True, international_system=True) - self.assertEqual(value, "1.011000 dUD({0}) TC".format(QLocale.toString( + self.assertEqual(value, "1.011000 mUD({0}) TC".format(QLocale.toString( QLocale(), QDateTime.fromTime_t(1452663088792).date(), QLocale.dateFormat(QLocale(), QLocale.ShortFormat) @@ -103,7 +103,7 @@ class TestRelativeToPast(unittest.TestCase, QuamashTest): @patch('sakia.core.Community') @patch('sakia.core.Application') def test_localized_no_units_with_si(self, app, community): - community.dividend = CoroutineMock(return_value=10000) + community.dividend = CoroutineMock(return_value=1000000) community.get_block = CoroutineMock(return_value={'medianTime': 1452663088792}) type(community).short_currency = PropertyMock(return_value="TC") app.preferences = { @@ -112,7 +112,7 @@ class TestRelativeToPast(unittest.TestCase, QuamashTest): referential = RelativeToPast(1011, community, app, 100) async def exec_test(): value = await referential.localized(units=False, international_system=True) - self.assertEqual(value, "1.011000 dUD({0}) ".format(QLocale.toString( + self.assertEqual(value, "1.011000 mUD({0}) ".format(QLocale.toString( QLocale(), QDateTime.fromTime_t(1452663088792).date(), QLocale.dateFormat(QLocale(), QLocale.ShortFormat) @@ -141,7 +141,7 @@ class TestRelativeToPast(unittest.TestCase, QuamashTest): @patch('sakia.core.Community') @patch('sakia.core.Application') def test_diff_localized_with_si(self, app, community): - community.dividend = CoroutineMock(return_value=10000) + community.dividend = CoroutineMock(return_value=1000000) community.get_block = CoroutineMock(return_value={'medianTime': 1452663088792}) type(community).short_currency = PropertyMock(return_value="TC") app.preferences = { @@ -150,7 +150,7 @@ class TestRelativeToPast(unittest.TestCase, QuamashTest): referential = RelativeToPast(1011, community, app, 100) async def exec_test(): value = await referential.diff_localized(units=True, international_system=True) - self.assertEqual(value, "1.011000 dUD({0}) TC".format(QLocale.toString( + self.assertEqual(value, "1.011000 mUD({0}) TC".format(QLocale.toString( QLocale(), QDateTime.fromTime_t(1452663088792).date(), QLocale.dateFormat(QLocale(), QLocale.ShortFormat) @@ -175,7 +175,7 @@ class TestRelativeToPast(unittest.TestCase, QuamashTest): @patch('sakia.core.Community') @patch('sakia.core.Application') def test_diff_localized_no_units_with_si(self, app, community): - community.dividend = CoroutineMock(return_value=10000) + community.dividend = CoroutineMock(return_value=1000000) community.get_block = CoroutineMock(return_value={'medianTime': 1452663088792}) type(community).short_currency = PropertyMock(return_value="TC") app.preferences = { @@ -184,7 +184,7 @@ class TestRelativeToPast(unittest.TestCase, QuamashTest): referential = RelativeToPast(1011, community, app, 100) async def exec_test(): value = await referential.diff_localized(units=False, international_system=True) - self.assertEqual(value, "1.011000 dUD({0}) ".format(QLocale.toString( + self.assertEqual(value, "1.011000 mUD({0}) ".format(QLocale.toString( QLocale(), QDateTime.fromTime_t(1452663088792).date(), QLocale.dateFormat(QLocale(), QLocale.ShortFormat) diff --git a/src/sakia/tests/unit/core/money/test_relative_zsum.py b/src/sakia/tests/unit/core/money/test_relative_zsum.py index e6430c3b9c22bd44df4b3a8f7e3b334f3d330d77..2a8208997fc6f2a7a34c7fece2fdd5cfe46f0eda 100644 --- a/src/sakia/tests/unit/core/money/test_relative_zsum.py +++ b/src/sakia/tests/unit/core/money/test_relative_zsum.py @@ -81,7 +81,7 @@ class TestRelativeZSum(unittest.TestCase, QuamashTest): referential = RelativeZSum(110, community, app, None) async def exec_test(): value = await referential.localized(units=True, international_system=True) - self.assertEqual(value, "1.000000 dR0 TC") + self.assertEqual(value, "100.000000 mR0 TC") self.lp.run_until_complete(exec_test()) @patch('sakia.core.Community') @@ -115,7 +115,7 @@ class TestRelativeZSum(unittest.TestCase, QuamashTest): referential = RelativeZSum(110, community, app, None) async def exec_test(): value = await referential.localized(units=False, international_system=True) - self.assertEqual(value, "1.000000 dR0 ") + self.assertEqual(value, "100.000000 mR0 ") self.lp.run_until_complete(exec_test()) @patch('sakia.core.Community') @@ -146,7 +146,7 @@ class TestRelativeZSum(unittest.TestCase, QuamashTest): referential = RelativeZSum(90, community, app, None) async def exec_test(): value = await referential.diff_localized(units=True, international_system=True) - self.assertEqual(value, "9.000000 dR0 TC") + self.assertEqual(value, "900.000000 mR0 TC") self.lp.run_until_complete(exec_test()) @patch('sakia.core.Community') @@ -180,5 +180,5 @@ class TestRelativeZSum(unittest.TestCase, QuamashTest): referential = RelativeZSum(90, community, app, None) async def exec_test(): value = await referential.diff_localized(units=False, international_system=True) - self.assertEqual(value, "9.000000 dR0 ") + self.assertEqual(value, "900.000000 mR0 ") self.lp.run_until_complete(exec_test())