def reset(ip=None, username=None):
    count = 0

    attempts = AccessAttempt.objects.all()
    if ip:
        attempts = attempts.filter(ip_address=ip)
    if username:
        attempts = attempts.filter(username=username)

    if attempts:
        count = attempts.count()
        attempts.delete()

    return count
The templatetag module under test.
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/django-axes-1.4.0/axes/utils.py/reset--crossover with--dataset/ETHPy150Open mozilla/moztrap/tests/view/templatetags/test_urls.py/FilterTest.urls