File: test_config.py

package info (click to toggle)
python-sepaxml 2.7.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 352 kB
  • sloc: python: 4,226; makefile: 4
file content (25 lines) | stat: -rw-r--r-- 521 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import pytest

from sepaxml import SepaDD


def test_valid_config():
    SepaDD({
        "name": "TestCreditor",
        "IBAN": "NL50BANK1234567890",
        "BIC": "BANKNL2A",
        "batch": True,
        "creditor_id": "000000",
        "currency": "EUR"
    })


def test_invalid_config():
    with pytest.raises(Exception):
        SepaDD({
            "name": "TestCreditor",
            "BIC": "BANKNL2A",
            "batch": True,
            "creditor_id": "000000",
            "currency": "EUR"
        })