I have something like this:
abc.py
DEFAULT_PATTERN = ['abc','dfg']
def.py
checkName(name):
if not [pattern for pattern in DEFAULT_PATTERN if pattern in name]:
print 'Hello'
How will it ensure that I write a test case for my function by mocking the DEFAULT_PATTERN
? I am basically checking if the pattern is present in the name i pass to the function.