def test_transformer_method(proxy_client, serve):
    with patch('os.environ') as env:
        env['SAGEMAKER_PROGRAM'] = 'script.py'
        env['SAGEMAKER_SUBMIT_DIRECTORY'] = 's3://what/ever'

        user_module = Mock(spec=[])
        serve.Transformer.from_module = Mock()

        serve.transformer(user_module)

        serve.Transformer.from_module.assert_called_once_with(user_module, proxy_client())
def test_transformer_method(proxy_client):
    with patch('os.environ') as env:
        env['SAGEMAKER_PROGRAM'] = 'script.py'
        env['SAGEMAKER_SUBMIT_DIRECTORY'] = 's3://what/ever'

        user_module = Mock(spec=[])
        serve.Transformer.from_module = Mock()

        serve.transformer(user_module)

        serve.Transformer.from_module.assert_called_once_with(user_module, proxy_client())