示例#1
0
def account_obj_d():
    return dict(
        **new_base_kwargs(),
        auth_id='xxxxyyyy/test_user',
        username='******',
        email='*****@*****.**',
        date_joined=format_dt(datetime.utcnow()),
        last_login=format_dt(datetime.utcnow()),
    )
示例#2
0
def stream_obj_d(account_obj_d):
    return dict(
        **new_base_kwargs(),
        name='FakeStream',
        pushed=format_dt(datetime.utcnow()),
        updated=format_dt(datetime.utcnow()),
        finished=format_dt(datetime.utcnow()),
        status='pushed',
        account=account_obj_d,
    )
示例#3
0
def function_instance_obj_d(function_type_obj_d, stream_obj_d):
    return dict(
        **new_base_kwargs(),
        function_type=function_type_obj_d,
        stream=stream_obj_d,
        position={'row': 0, 'col': 0},
        initialized=format_dt(datetime.utcnow()),
        updated=format_dt(datetime.utcnow()),
        completed=format_dt(datetime.utcnow()),
        status='pending',
    )
示例#4
0
def function_type_obj_d(function_cd, account_obj_d):
    return dict(
        **new_base_kwargs(),
        key='%s/%s' % (str(account_obj_d.get('uuid'))[:8], function_cd['key']),
        verbose_name=function_cd['verbose_name'],
        description=function_cd['description'],
        updated=format_dt(datetime.utcnow()),
        inputs=function_cd['inputs'],
        outputs=function_cd['outputs'],
        account=account_obj_d,
    )
示例#5
0
def new_base_kwargs():
    return dict(
        uuid=str(uuid4()),
        created=format_dt(datetime.utcnow()), )