Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def has_only_n_test_cases(name, num, *matchers):
return has_property('test_cases',
ContainsExactly(num,
all_of(
any_of(
has_entry('fullName', ends_with(name)),
has_entry('name', ends_with(name))
),
*matchers
)