Пример #1
0
def test_list_paasta_services(
    mock_list_services,
    mock_list_instances,
):
    mock_list_services.return_value = ['fake_service']
    mock_list_instances.return_value = ['canary', 'main']
    expected = ['fake_service']
    actual = utils.list_paasta_services()
    assert actual == expected
Пример #2
0
def test_list_paasta_services(
    mock_list_services,
    mock_list_instances,
):
    mock_list_services.return_value = ['fake_service']
    mock_list_instances.return_value = ['canary', 'main']
    expected = ['fake_service']
    actual = utils.list_paasta_services()
    assert actual == expected
Пример #3
0
def paasta_list(args):
    """Print a list of Yelp services currently running
    :param args: argparse.Namespace obj created from sys.args by cli"""
    if args.print_instances:
        services = list_service_instances()
    elif args.all:
        services = list_services()
    else:
        services = list_paasta_services()

    for service in services:
        paasta_print(service)
Пример #4
0
def paasta_list(args):
    """Print a list of Yelp services currently running
    :param args: argparse.Namespace obj created from sys.args by cli"""
    if args.print_instances:
        services = list_service_instances()
    elif args.all:
        services = list_services()
    else:
        services = list_paasta_services()

    for service in services:
        print service
Пример #5
0
def test_list_paasta_services(mock_list_services, mock_list_instances):
    mock_list_services.return_value = ["fake_service"]
    mock_list_instances.return_value = ["canary", "main"]
    expected = ["fake_service"]
    actual = utils.list_paasta_services()
    assert actual == expected