Did I find the right examples for you? yes no

All Samples(20)  |  Call(10)  |  Derive(0)  |  Import(10)

src/b/o/bodhi-HEAD/tools/pickledb.py   bodhi(Download)
    import transaction
    from bodhi.models import DBSession, Base
    from bodhi.models import Release, Update, Build, Comment, User, Bug, CVE
    from bodhi.models import Package, Group
    from bodhi.models import UpdateType, UpdateStatus, UpdateRequest
                    user = db.query(User).filter_by(name=u['submitter']).one()
                except NoResultFound:
                    user = User(name=u['submitter'])
                    db.add(user)
                    db.flush()
                    user = db.query(User).filter_by(name=name).one()
                except NoResultFound:
                    user = User(name=name)
                    db.add(user)
                    db.flush()

src/b/o/bodhi-HEAD/bodhi/services/builds.py   bodhi(Download)
 
from bodhi import log
from bodhi.models import Update, Build, Bug, CVE, Package, User, Release, Group
import bodhi.schemas
import bodhi.security

src/b/o/bodhi-HEAD/bodhi/services/user.py   bodhi(Download)
 
from bodhi import log
from bodhi.models import Update, Package, User, Comment, Group
import bodhi.services.updates
import bodhi.schemas

src/b/o/bodhi-HEAD/bodhi/__init__.py   bodhi(Download)
def get_user(request):
    from bodhi.models import User
    userid = unauthenticated_userid(request)
    if userid is not None:
        return request.db.query(User).filter_by(name=unicode(userid)).one()

src/b/o/bodhi-HEAD/bodhi/tests/functional/base.py   bodhi(Download)
 
from bodhi import main
from bodhi.models import (
    Base,
    Bug,
    def populate(self):
        session = DBSession()
        user = User(name=u'guest')
        session.add(user)
        provenpackager = Group(name=u'provenpackager')

src/b/o/bodhi-HEAD/bodhi/tests/models/test_models.py   bodhi(Download)
    def do_get_dependencies(self):
        return dict(
            committers=[model.User(name=u'lmacken')]
        )
 
            cves=[model.CVE(cve_id=u'CVE-2009-0001')],
            release=release,
            user=model.User(name=u'lmacken')
            )
 
    def test_set_request_stable_after_week_in_testing(self):
        req = DummyRequest()
        req.errors = cornice.Errors()
        req.koji = buildsys.get_session()
        req.user = model.User(name='bob')
    def do_get_dependencies(self):
        user = model.User(name=u'bob')
        return dict(users=[user])
 

src/b/o/bodhi-HEAD/bodhi/tests/functional/test_updates.py   bodhi(Download)
from bodhi import main
from bodhi.config import config
from bodhi.models import (
    Base,
    Bug,
    def test_no_privs(self):
        session = DBSession()
        user = User(name=u'bodhi')
        session.add(user)
        session.flush()
    def test_provenpackager_privs(self):
        "Ensure provenpackagers can push updates for any package"
        session = DBSession()
        user = User(name=u'bodhi')
        session.add(user)

src/b/o/bodhi-HEAD/bodhi/tests/functional/test_users.py   bodhi(Download)
 
from bodhi import main
from bodhi.models import (
    Base,
    Bug,
    def setUp(self):
        super(TestUsersService, self).setUp()
 
        session = DBSession()
        user = User(name=u'bodhi')

src/b/o/bodhi-HEAD/bodhi/tests/functional/test_comments.py   bodhi(Download)
from bodhi import main
from bodhi.config import config
from bodhi.models import (
    Base,
    Bug,

src/b/o/bodhi-HEAD/bodhi/tests/functional/test_builds.py   bodhi(Download)
 
from bodhi import main
from bodhi.models import (
    Base,
    Bug,

  1 | 2  Next