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


import decimal
import pytest
from netvisor.exc import InvalidData
from ..utils import get_response_content
                'unit_weight': None,
                'purchase_price': None,
                'tariff_heading': None,
                'comission_percentage': None,
                'is_active': False,
                'is_sales_product': None,
            },
            'product_book_keeping_details': {
                'default_vat_percent': decimal.Decimal('0'),
                'default_domestic_account_number': u'3000',
                'default_eu_account_number': u'3360',
                'default_outside_eu_account_number': u'3380',
            },
            'product_inventory_details': {
                'inventory_amount': decimal.Decimal('0.00'),
                'inventory_mid_price': decimal.Decimal('0.0000'),
                'inventory_value': decimal.Decimal('0.00'),
                'inventory_reserved_amount': decimal.Decimal('0.00'),
                'inventory_ordered_amount': decimal.Decimal('0.00'),
            }
        }

    def test_get_raises_error_if_product_not_found(self, netvisor, responses):
        responses.add(
            method='GET',
            url='http://koulutus.netvisor.fi/GetProduct.nv?id=123',
            body=get_response_content('GetProductNotFound.xml'),
            content_type='text/html; charset=utf-8',
            match_querystring=True
        )

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


# Path: tests/services/test_product.py
import decimal
import pytest
from netvisor.exc import InvalidData
from ..utils import get_response_content

                'unit_weight': None,
                'purchase_price': None,
                'tariff_heading': None,
                'comission_percentage': None,
                'is_active': False,
                'is_sales_product': None,
            },
            'product_book_keeping_details': {
                'default_vat_percent': decimal.Decimal('0'),
                'default_domestic_account_number': u'3000',
                'default_eu_account_number': u'3360',
                'default_outside_eu_account_number': u'3380',
            },
            'product_inventory_details': {
                'inventory_amount': decimal.Decimal('0.00'),
                'inventory_mid_price': decimal.Decimal('0.0000'),
                'inventory_value': decimal.Decimal('0.00'),
                'inventory_reserved_amount': decimal.Decimal('0.00'),
                'inventory_ordered_amount': decimal.Decimal('0.00'),
            }
        }

    def test_get_raises_error_if_product_not_found(self, netvisor, responses):
        responses.add(
            method='GET',
            url='http://koulutus.netvisor.fi/GetProduct.nv?id=123',
            body=get_response_content('GetProductNotFound.xml'),
            content_type='text/html; charset=utf-8',
            match_querystring=True
        )

        with pytest.raises(InvalidData) as excinfo: