#NEWLINE# def test_media_path_generator( self ) : #NEWLINE# #INDENT# generate = generators . MediaFilePathGenerator ( recursive = True ) #NEWLINE# for i in range ( 10 ) : #NEWLINE# #INDENT# path = generate ( ) #NEWLINE# self . assertTrue ( ( len ( path ) > 0 ) ) #NEWLINE# self . assertFalse ( path . startswith ( '/' ) ) #NEWLINE# media_path = os . path . join ( settings . MEDIA_ROOT , media_path ) #NEWLINE# self . assertTrue ( os . path . exists ( media_path ) ) #NEWLINE# self . assertTrue ( os . path . isfile ( media_path ) )