def test_get_render_only_decoder(): with pytest.raises(UnsupportedContentType): negotiate_decoder('text/html')
def test_get_unsupported_decoder(): with pytest.raises(UnsupportedContentType): negotiate_decoder('application/csv')
def test_get_supported_decoder(): assert isinstance(negotiate_decoder('application/vnd.coreapi+json'), CoreJSONCodec)
def test_get_supported_decoder_with_parameters(): assert isinstance(negotiate_decoder('application/vnd.coreapi+json; verison=1.0'), CoreJSONCodec)
def test_get_default_decoder(): assert isinstance(negotiate_decoder(), CoreJSONCodec)