"""Tests for handlers.""" from oto.response import Response from ows_product_physical.logic import product_physical def test_get_supply_chain_defaults_for_product( mocker, client, valid_post_header, valid_get_supply_chain_info_response): """Test GET product supply chain defaults handler.""" product_id = 2189079 mocker.patch.object( product_physical, 'get_supply_chain_defaults_by_product_id', return_value=Response(valid_get_supply_chain_info_response)) result = client.get( '/product/{}/supply-chain-defaults'.format(product_id), headers=valid_post_header) assert result.status_code == 200