<s> """<STR_LIT>""" <EOL> from django . test import TransactionTestCase <EOL> from ionyweb . website . models import WebSite <EOL> from django . contrib . sites . models import Site <EOL> from ionyweb . file_manager . models import FileManager , Directory <EOL> from django . contrib . auth . models import User <EOL> import os <EOL> class SimpleTest ( TransactionTestCase ) : <EOL> def setUp ( self ) : <EOL> site = Site . objects . get_or_create ( pk = <NUM_LIT:1> ) [ <NUM_LIT:0> ] <EOL> site . domain = "<STR_LIT>" <EOL> site . name = "<STR_LIT>" <EOL> site . save ( ) <EOL> self . website = WebSite . objects . create ( <EOL> title = "<STR_LIT>" , theme = "<STR_LIT>" , <EOL> default_layout = "<STR_LIT:100>" , slug = "<STR_LIT>" , <EOL> domain = site ) <EOL> self . website . ndds . add ( site ) <EOL> def test_file_manager_getter_with_creation ( self ) : <EOL> self . assertEqual ( self . website . files_library , None ) <EOL> self . website . file_manager ( ) <EOL> self . assertNotEqual ( self . website . files_library , None ) <EOL> def test_file_manager_creation_media_root ( self ) : <EOL> self . website . file_manager ( ) <EOL> self . assertEqual ( os . path . isdir ( self . website . media_root ( ) ) , True ) <EOL> def test_file_manager_get_list_folder ( self ) : <EOL> self . assertEqual ( self . website . file_manager ( ) . root . children . count ( ) , <NUM_LIT:0> ) <EOL> def test_file_manager_display_mode ( self ) : <EOL> user = User . objects . create ( username = '<STR_LIT>' , email = '<STR_LIT>' , password = '<STR_LIT>' , is_active = False ) <EOL> self . assertEqual ( user . profile . get ( ) . file_manager_display_mode , "<STR_LIT:L>" ) <EOL> def test_file_manager_create_directory ( self ) : <EOL> self . website . file_manager ( ) . root . add_directory ( '<STR_LIT>' ) <EOL> self . assertEqual ( self . website . file_manager ( ) . root . children . count ( ) , <NUM_LIT:1> ) <EOL> self . assertEqual ( self . website . file_manager ( ) . root . children . get ( ) . name , '<STR_LIT>' ) <EOL> def test_do_upload ( self ) : <EOL> pass </s>
