#NEWLINE# def new_document_data( topic_ids = None , product_ids = None ) : #NEWLINE# #INDENT# product_ids = ( product_ids or [ ProductFactory ( ) . id ] ) #NEWLINE# p = Product . objects . get ( id = product_ids [ 0 ] ) #NEWLINE# topic_ids = ( topic_ids or [ TopicFactory ( product = p ) . id ] ) #NEWLINE# return { #NEWLINE# #INDENT# 'title' : 'A Test Article' , #NEWLINE# 'slug' : 'a-test-article' , #NEWLINE# 'locale' : 'en-US' , #NEWLINE# 'topics' : topic_ids , #NEWLINE# 'products' : product_ids , #NEWLINE# 'category' : CATEGORIES [ 0 ] [ 0 ] , #NEWLINE# 'keywords' : 'key1, key2' , #NEWLINE# 'summary' : 'lipsum' , #NEWLINE# 'content' : 'lorem ipsum dolor sit amet' , #NEWLINE# #UNINDENT# }