def test_get_cases(): cases = automate.get_cases('tests/fixtures/analysis/customers/cust001') assert len(cases) == 2 # test with trailing slash cases = automate.get_cases('tests/fixtures/analysis/customers/cust001/') assert len(cases) == 2
def cust(context, customer_paths): """Display status for multiple customer cases.""" if len(customer_paths) == 0: customer_paths = expand_paths(*context.obj.get('customer_roots', [])) for customer_path in customer_paths: case_paths = automate.get_cases(customer_path) click.echo("Path: {}".format(customer_path)) if len(case_paths) > 0: context.invoke(case, case_paths=case_paths) else: click.echo('No cases found here...')