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',
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 {