示例#1
0
def deployment_3(session, author_joe, module_a, tag_2):
    d = Deployment(author_joe.id, module_a.id,
                   datetime.utcnow() - timedelta(days=1))
    d.tags = [tag_2]
    session.add(d)
    session.commit()
    return d
示例#2
0
def deployment_1(session,
                 author_joe,
                 module_a,
                 tag_1):
    d = Deployment(author_joe.id, module_a.id, datetime.now())
    d.tags = [tag_1]
    session.add(d)
    session.commit()
    return d
示例#3
0
def deployment_3(session,
                 author_joe,
                 module_a,
                 tag_2):
    d = Deployment(author_joe.id, module_a.id,
                   datetime.utcnow() - timedelta(days=1))
    d.tags = [tag_2]
    session.add(d)
    session.commit()
    return d
示例#4
0
def deployments_many(session, author_joe, module_a, tag_2):

    # Experimental do not use
    # Build an array of tuples of times and numbers of deploys
    # Reverse index, so a time of 1.37 means 1.37 days before
    # The current time

    deployment_array = []
    deployment_array.append(1)

    d = Deployment(author_joe.id, module_a.id,
                   datetime.utcnow() - timedelta(days=1))
    d.tags = [tag_2]
    session.add(d)
    session.commit()
    return d
示例#5
0
def deployments_many(session,
                     author_joe,
                     module_a,
                     tag_2):

    # Experimental do not use
    # Build an array of tuples of times and numbers of deploys
    # Reverse index, so a time of 1.37 means 1.37 days before
    # The current time

    deployment_array = [
    ]
    deployment_array.append(1)

    d = Deployment(author_joe.id, module_a.id,
                   datetime.utcnow() - timedelta(days=1))
    d.tags = [tag_2]
    session.add(d)
    session.commit()
    return d
示例#6
0
def deployment_1(session, author_joe, module_a, tag_1):
    d = Deployment(author_joe.id, module_a.id, datetime.now())
    d.tags = [tag_1]
    session.add(d)
    session.commit()
    return d