From f52169afd8d9be915f3818c345c9790878efb6e3 Mon Sep 17 00:00:00 2001 From: Mauro Scomparin Date: Mon, 16 Sep 2019 22:51:41 +0200 Subject: [PATCH] nuovo test --- money/tests/test_money.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/money/tests/test_money.py b/money/tests/test_money.py index e91163d..017cedb 100644 --- a/money/tests/test_money.py +++ b/money/tests/test_money.py @@ -100,7 +100,7 @@ class MoneyTest(unittest.TestCase): self.assertEqual(res[2]['prog'], 3) self.assertEqual(res[3]['prog'], 4) - def test_mov_filter(self): + def test_mov_filter_match(self): m = { money.TYPE_FIELD_NAME: '-', money.VALUE_FIELD_NAME: '100', @@ -112,6 +112,18 @@ class MoneyTest(unittest.TestCase): res = money.mov_filter(ms, 't') self.assertEqual(len(res), 1) + def test_mov_filter_no_match(self): + m = { + money.TYPE_FIELD_NAME: '-', + money.VALUE_FIELD_NAME: '100', + money.DATE_FIELD_NAME: '18/04/2017', + money.HOUR_FIELD_NAME: '00:01', + money.DESCRIPTION_FIELD_NAME: 'test', + } + ms = [m] + res = money.mov_filter(ms, 'a') + self.assertEqual(len(res), 0) + def create_test_movement(date, hour, prog): return { -- 2.25.1