def METHOD_NAME(self, db_session, factories):
    authz_codes = [
        factories.AuthzCode(expires=datetime(2014, 5, 6, 7, 8, 9)),
        factories.AuthzCode(expires=(datetime.utcnow() + timedelta(hours=1))),
    ]
    db_session.add_all(authz_codes)
    assert db_session.query(AuthzCode).count() == 2
    purge_expired_authz_codes()
    assert db_session.query(AuthzCode).count() == 1