Coverage for jbank/management/commands/test_svm.py: 73%

1 from pprint import pprint

2 from django.core.management.base import CommandParser

3 from jbank.svm import parse_svm_batches_from_file

4 from jutil.command import SafeCommand

5

6

7 class Command(SafeCommand):

8 help = "Parses bank reference payment .SVM (saapuvat viitemaksut) files"

9

10 def add_arguments(self, parser: CommandParser):

11 parser.add_argument("path", type=str)

12

13 def do(self, *args, **options):

14 batches = parse_svm_batches_from_file(options["path"])

15 pprint(batches)