Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)

src/t/o/torabot-HEAD/torabot/db/__init__.py   torabot(Download)
    set_query_field_bi_id,
)
from .notice import (
    get_notices_bi_user_id,
    get_pending_notices_bi_user_id,

src/t/o/torabot-HEAD/torabot/db/test/test_query.py   torabot(Download)
from nose.tools import assert_equal, assert_is_not_none, assert_greater
from . import g
from ..notice import get_notices_bi_user_id
from ..user import add_user, add_email_bi_user_id, activate_email_bi_id
from ..watch import watch
        watch(g.connection, user_id=user_id, query_id=query_id)
        add_one_query_changes(g.connection, query_id, [{}])
        assert_equal(len(get_notices_bi_user_id(g.connection, user_id)), 1)
        trans.rollback()
 
        watch(g.connection, user_id=user_id, query_id=query_id, email_id=email_id)
        add_one_query_changes(g.connection, query_id, [{}])
        assert_equal(len(get_notices_bi_user_id(g.connection, user_id)), 0)
        trans.rollback()
 
        add_one_query_changes(g.connection, query_id, [{}])
        watch(g.connection, user_id=user_id, query_id=query_id)
        assert_equal(len(get_notices_bi_user_id(g.connection, user_id)), 0)
        add_one_query_changes(g.connection, query_id, [{}])
        assert_equal(len(get_notices_bi_user_id(g.connection, user_id)), 1)