@when(u'we generate deployments.json for that service')
def step_impl_when(context):
    context.deployments_file = os.path.join('fake_soa_configs', 'fake_deployments_json_service', 'deployments.json')
    try:
        os.remove(context.deployments_file)
    except __HOLE__:
        pass
    fake_args = mock.MagicMock(
        service='fake_deployments_json_service',
        soa_dir='fake_soa_configs',
        verbose=True,
    )
    with contextlib.nested(
        mock.patch('paasta_tools.generate_deployments_for_service.get_git_url', autospec=True,
                   return_value=context.test_git_repo_dir),
        mock.patch('paasta_tools.generate_deployments_for_service.parse_args',
                   autospec=True, return_value=fake_args),
    ) as (
        mock_get_git_url,
        mock_parse_args,
    ):
        generate_deployments_for_service.main()
dataset/ETHPy150Open Yelp/paasta/general_itests/steps/deployments_json_steps.py/step_impl_when