# Path: netvisor/exc.py
# class InvalidData(NetvisorError):
#     pass
# 
# Path: tests/utils.py
# def get_request_content(filename):
#     filename = os.path.join(get_requests_dir(), filename)
#     return read_file(filename)
# 
# def get_response_content(filename):
#     filename = os.path.join(get_responses_dir(), filename)
#     return read_file(filename)


import decimal
import pytest
from datetime import date
from marshmallow import ValidationError
from netvisor.exc import InvalidData
from ..utils import get_request_content, get_response_content
                        'type': 'net'
                    },
                    'vat_percentage': {
                        'percentage': decimal.Decimal('22'),
                        'code': 'KOMY',
                    },
                    'quantity': decimal.Decimal('2'),
                    'discount_percentage': decimal.Decimal('0'),
                    'free_text': 'Punainen',
                    'accounting_account_suggestion': '3000'
                },
                {
                    'identifier': '1697',
                    'name': 'Banaani',
                    'unit_price': {
                        'amount': decimal.Decimal('100.00'),
                        'type': 'net'
                    },
                    'vat_percentage': {
                        'percentage': decimal.Decimal('22'),
                        'code': 'KOMY',
                    },
                    'quantity': decimal.Decimal('1'),
                    'free_text': 'Keltainen',
                    'accounting_account_suggestion': '3200'
                }
            ]
        })
        request = responses.calls[0].request
        assert netvisor_id == 8

# Path: netvisor/exc.py
# class InvalidData(NetvisorError):
#     pass
# 
# Path: tests/utils.py
# def get_request_content(filename):
#     filename = os.path.join(get_requests_dir(), filename)
#     return read_file(filename)
# 
# def get_response_content(filename):
#     filename = os.path.join(get_responses_dir(), filename)
#     return read_file(filename)


# Path: tests/services/test_sales_invoice.py
import decimal
import pytest
from datetime import date
from marshmallow import ValidationError
from netvisor.exc import InvalidData
from ..utils import get_request_content, get_response_content

                        'type': 'net'
                    },
                    'vat_percentage': {
                        'percentage': decimal.Decimal('22'),
                        'code': 'KOMY',
                    },
                    'quantity': decimal.Decimal('2'),
                    'discount_percentage': decimal.Decimal('0'),
                    'free_text': 'Punainen',
                    'accounting_account_suggestion': '3000'
                },
                {
                    'identifier': '1697',
                    'name': 'Banaani',
                    'unit_price': {
                        'amount': decimal.Decimal('100.00'),
                        'type': 'net'
                    },
                    'vat_percentage': {
                        'percentage': decimal.Decimal('22'),
                        'code': 'KOMY',
                    },
                    'quantity': decimal.Decimal('1'),
                    'free_text': 'Keltainen',
                    'accounting_account_suggestion': '3200'
                }
            ]
        })
        request = responses.calls[0].request
        assert netvisor_id == 8

        assert request.body == get_request_content('SalesInvoice.xml')