#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# '\n        ' #NEWLINE# self . client . login ( username = 'admin' , password = 'admin' ) #NEWLINE# for i in range ( 0 , 10 ) : #NEWLINE# #INDENT# product = Product ( name = ( 'Product %s' % i ) , slug = ( 'product-%s' % i ) , description = ( 'This is the description %s' % i ) , price = i ) #NEWLINE# product . save ( ) #NEWLINE# #UNINDENT# c1 = Category ( name = 'Category 1' , slug = 'category-1' ) #NEWLINE# c1 . save ( ) #NEWLINE# c11 = Category ( name = 'Category 1-1' , slug = 'category-1-1' , parent = c1 ) #NEWLINE# c11 . save ( ) #NEWLINE# c111 = Category ( name = 'Category 1-1-1' , slug = 'category-1-1-1' , parent = c11 ) #NEWLINE# c111 . save ( ) #NEWLINE# product = Product . objects . get ( slug = 'product-1' ) #NEWLINE# c111 . products = ( product , )