Skip to content

Commit b29f66e

Browse files
author
Sebastian Wagner
committed
BUG+TST: upgrade: fix v230_csv_parser_parameter_fix
rename v230_csv_parser_parameter_fix to release preparation fix the test which was not called before, as the test method did not start with test_, and the used method name was wrong as well
1 parent e22944f commit b29f66e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

intelmq/lib/upgrades.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
'v220_feed_changes',
2828
'v221_feed_changes',
2929
'v222_feed_changes',
30-
'v230_csv_parser_parameter_fix_1',
30+
'v230_csv_parser_parameter_fix',
3131
'v230_deprecations',
3232
'v230_feed_changes',
3333
]
@@ -517,7 +517,7 @@ def v222_feed_changes(defaults, runtime, harmonization, dry_run):
517517
return changed, defaults, runtime, harmonization
518518

519519

520-
def v230_csv_parser_parameter_fix_1(defaults, runtime, harmonization, dry_run):
520+
def v230_csv_parser_parameter_fix(defaults, runtime, harmonization, dry_run):
521521
"""
522522
Fix CSV parser parameter misspelling
523523
"""
@@ -588,7 +588,7 @@ def v230_feed_changes(defaults, runtime, harmonization, dry_run):
588588
((2, 2, 1), (v221_feed_changes, )),
589589
((2, 2, 2), (v222_feed_changes, )),
590590
((2, 2, 3), ()),
591-
((2, 3, 0), (v230_csv_parser_parameter_fix_1, v230_feed_changes, v230_deprecations,)),
591+
((2, 3, 0), (v230_csv_parser_parameter_fix, v230_feed_changes, v230_deprecations,)),
592592
])
593593

594594
ALWAYS = (harmonization, )

intelmq/tests/lib/test_upgrades.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -611,19 +611,19 @@ def test_v222_feed_changes(self):
611611
self.assertTrue(result[0])
612612
self.assertEqual(V222_OUT, result[2])
613613

614-
def v230_csv_parser_parameter_fix_1(self):
614+
def test_v230_csv_parser_parameter_fix(self):
615615
""" Test v230_feed_fix """
616-
result = upgrades.v230_feed_fix({}, V230_IN, {}, False)
616+
result = upgrades.v230_csv_parser_parameter_fix({}, V230_IN, {}, False)
617617
self.assertTrue(result[0])
618618
self.assertEqual(V230_OUT, result[2])
619619

620620
# with also the new fixed parameter
621-
result = upgrades.v230_feed_fix({}, V230_IN_BOTH, {}, False)
621+
result = upgrades.v230_csv_parser_parameter_fix({}, V230_IN_BOTH, {}, False)
622622
self.assertTrue(result[0])
623623
self.assertEqual(V230_OUT, result[2])
624624

625625
# with new parameter, no change
626-
result = upgrades.v230_feed_fix({}, V230_OUT, {}, False)
626+
result = upgrades.v230_csv_parser_parameter_fix({}, V230_OUT, {}, False)
627627
self.assertIsNone(result[0])
628628
self.assertEqual(V230_OUT, result[2])
629629

0 commit comments

Comments
 (0)