<s> import uuid <EOL> from casexml . apps . case . models import CommCareCase <EOL> from couchforms . models import XFormInstance <EOL> DOMAIN = "<STR_LIT>" <EOL> DEFAULT_USER = "<STR_LIT>" <EOL> DEFAULT_CASE_TYPE = "<STR_LIT>" <EOL> DEFAULT_CASE_NAME = "<STR_LIT>" <EOL> DEFAULT_APP_ID = "<STR_LIT>" <EOL> DEFAULT_XMLNS = "<STR_LIT>" <EOL> def new_case ( domain = DOMAIN , user_id = DEFAULT_USER , owner_id = DEFAULT_USER , <EOL> type = DEFAULT_CASE_TYPE , name = DEFAULT_CASE_NAME , <EOL> closed = False , ** kwargs ) : <EOL> kwargs [ "<STR_LIT>" ] = kwargs . get ( "<STR_LIT>" , uuid . uuid4 ( ) . hex ) <EOL> return CommCareCase ( <EOL> domain = domain , <EOL> user_id = user_id , <EOL> owner_id = owner_id , <EOL> type = type , <EOL> name = name , <EOL> closed = closed , <EOL> ** kwargs <EOL> ) <EOL> def new_form ( domain = DOMAIN , app_id = DEFAULT_APP_ID , xmlns = DEFAULT_XMLNS , ** kwargs ) : <EOL> kwargs [ "<STR_LIT>" ] = kwargs . get ( "<STR_LIT>" , uuid . uuid4 ( ) . hex ) <EOL> return XFormInstance ( <EOL> domain = domain , <EOL> app_id = app_id , <EOL> xmlns = xmlns , <EOL> ** kwargs <EOL> ) </s>
