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()), )
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, )
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', )
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, )
def new_base_kwargs(): return dict( uuid=str(uuid4()), created=format_dt(datetime.utcnow()), )