Module Expr Str Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad NameLoad Str NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr With Call NameLoad AttributeLoad NameLoad attr Str NameStore body Expr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Str Str keyword Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Str Str Assign NameStore Call NameLoad For NameStore Call NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad If UnaryOpNot Call NameLoad NameLoad body Continue Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Str keyword Str keyword Call NameLoad keyword AttributeLoad NameLoad attr keyword Call NameLoad keyword AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Str keyword Str keyword Call NameLoad keyword AttributeLoad NameLoad attr keyword Call NameLoad keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num ListLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str TryFinally body Expr Call AttributeLoad NameLoad attr Str finalbody Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Str keyword Str keyword Call NameLoad keyword AttributeLoad NameLoad attr keyword Call NameLoad keyword AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Str keyword Str keyword Call NameLoad keyword AttributeLoad NameLoad attr keyword Call NameLoad keyword AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Str keyword Str keyword Call NameLoad keyword AttributeLoad NameLoad attr keyword Call NameLoad keyword AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr keyword Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword Str keyword Str keyword Call NameLoad keyword AttributeLoad NameLoad attr keyword Call NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword Str keyword Str keyword Call NameLoad keyword AttributeLoad NameLoad attr keyword Call NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list
N/A N/A 
For simplicity and to avoid requiring a paid-for account on some cloud
storage system testing is conducted against two local storage backends. Since
the QueuedStorage backend is truly agnostic about the local and remote
storage systems, this should work as transparently as using one (or even two!)
remote storage systems.
 N/A os N/A shutil N/A tempfile os path datetime datetime django.core.files.base File django.core.files.storage FileSystemStorage Storage django.test TestCase queued_storage.backends QueuedStorage queued_storage.conf settings N/A models StorageTests N/A TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self old_celery_always_eager N/A getattr settings CELERY_ALWAYS_EAGER False N/A N/A settings CELERY_ALWAYS_EAGER True N/A N/A self local_dir N/A N/A tempfile mkdtemp N/A N/A self remote_dir N/A N/A tempfile mkdtemp N/A tmp_dir N/A N/A tempfile mkdtemp N/A N/A self test_file_name queued_storage.txt N/A N/A self test_file_path N/A N/A path join tmp_dir N/A self test_file_name N/A N/A open N/A self test_file_path a test_file N/A N/A N/A N/A test_file write test N/A N/A self test_file N/A open N/A self test_file_path r N/A N/A N/A self addCleanup N/A shutil rmtree N/A self local_dir N/A N/A N/A self addCleanup N/A shutil rmtree N/A self remote_dir N/A N/A N/A self addCleanup N/A shutil rmtree tmp_dir N/A tearDown N/A N/A self N/A N/A N/A N/A settings CELERY_ALWAYS_EAGER N/A self old_celery_always_eager N/A test_storage_init N/A N/A self N/A N/A N/A 
        Make sure that creating a QueuedStorage object works
         N/A storage N/A QueuedStorage django.core.files.storage.FileSystemStorage django.core.files.storage.FileSystemStorage N/A N/A N/A self assertIsInstance storage QueuedStorage N/A N/A N/A self assertEqual FileSystemStorage N/A N/A storage local __class__ N/A N/A N/A self assertEqual FileSystemStorage N/A N/A storage remote __class__ N/A test_storage_cache_key N/A N/A self N/A N/A N/A storage N/A QueuedStorage django.core.files.storage.FileSystemStorage django.core.files.storage.FileSystemStorage cache_prefix test_cache_key N/A N/A N/A self assertEqual N/A storage cache_prefix test_cache_key N/A test_storage_methods N/A N/A self N/A N/A N/A 
        Make sure that QueuedStorage implements all the methods
         N/A storage N/A QueuedStorage django.core.files.storage.FileSystemStorage django.core.files.storage.FileSystemStorage N/A file_storage N/A Storage N/A attr N/A dir file_storage N/A N/A method N/A getattr file_storage attr N/A N/A N/A callable method N/A N/A N/A method N/A getattr storage attr False N/A N/A N/A self assertTrue N/A callable method N/A QueuedStorage has no method '%s' attr N/A test_storage_simple_save N/A N/A self N/A N/A N/A 
        Make sure that saving to remote locations actually works
         N/A storage N/A QueuedStorage local django.core.files.storage.FileSystemStorage remote django.core.files.storage.FileSystemStorage local_options N/A dict location N/A self local_dir remote_options N/A dict location N/A self remote_dir task tests.tasks.test_task N/A field N/A N/A N/A N/A models TestModel _meta get_field testfile N/A N/A field storage storage N/A obj N/A N/A models TestModel testfile N/A File N/A self test_file N/A N/A N/A obj save N/A N/A N/A self assertTrue N/A N/A path isfile N/A N/A path join N/A self local_dir N/A N/A obj testfile name N/A N/A N/A self assertTrue N/A N/A path isfile N/A N/A path join N/A self remote_dir N/A N/A obj testfile name N/A test_storage_celery_save N/A N/A self N/A N/A N/A 
        Make sure it actually works when using Celery as a task queue
         N/A storage N/A QueuedStorage local django.core.files.storage.FileSystemStorage remote django.core.files.storage.FileSystemStorage local_options N/A dict location N/A self local_dir remote_options N/A dict location N/A self remote_dir N/A field N/A N/A N/A N/A models TestModel _meta get_field testfile N/A N/A field storage storage N/A obj N/A N/A models TestModel testfile N/A File N/A self test_file N/A N/A N/A obj save N/A N/A N/A self assertTrue N/A N/A N/A N/A N/A obj testfile storage result get N/A N/A N/A self assertTrue N/A N/A path isfile N/A N/A path join N/A self local_dir N/A N/A obj testfile name N/A N/A N/A self assertTrue N/A N/A path isfile N/A N/A path join N/A self remote_dir N/A N/A obj testfile name Remote file is not available. N/A N/A N/A self assertFalse N/A N/A storage using_local N/A N/A obj testfile name N/A N/A N/A self assertTrue N/A N/A storage using_remote N/A N/A obj testfile name N/A N/A N/A self assertEqual N/A self test_file_name N/A N/A storage get_valid_name N/A self test_file_name N/A N/A N/A self assertEqual N/A self test_file_name N/A N/A storage get_available_name N/A self test_file_name N/A subdir_path N/A N/A N/A os path join test N/A self test_file_name N/A N/A N/A self assertTrue N/A N/A storage exists subdir_path N/A N/A N/A self assertEqual N/A N/A storage path N/A self test_file_name N/A N/A path join N/A self local_dir N/A self test_file_name N/A N/A N/A self assertEqual N/A N/A N/A storage listdir test N/A 1 N/A N/A self test_file_name N/A N/A N/A self assertEqual N/A N/A storage size subdir_path N/A N/A N/A os stat N/A self test_file_path st_size N/A N/A N/A self assertEqual N/A N/A storage url N/A self test_file_name N/A self test_file_name N/A N/A N/A self assertIsInstance N/A N/A storage accessed_time subdir_path datetime N/A N/A N/A self assertIsInstance N/A N/A storage created_time subdir_path datetime N/A N/A N/A self assertIsInstance N/A N/A storage modified_time subdir_path datetime N/A subdir_name queued_storage_2.txt N/A testfile N/A N/A storage open subdir_name w N/A N/A N/A N/A N/A testfile write test N/A N/A N/A N/A testfile close N/A N/A N/A self assertTrue N/A N/A storage exists subdir_name N/A N/A N/A storage delete subdir_name N/A N/A N/A self assertFalse N/A N/A storage exists subdir_name N/A test_transfer_and_delete N/A N/A self N/A N/A N/A 
        Make sure the TransferAndDelete task does what it says
         N/A storage N/A QueuedStorage local django.core.files.storage.FileSystemStorage remote django.core.files.storage.FileSystemStorage local_options N/A dict location N/A self local_dir remote_options N/A dict location N/A self remote_dir task queued_storage.tasks.TransferAndDelete N/A field N/A N/A N/A N/A models TestModel _meta get_field testfile N/A N/A field storage storage N/A obj N/A N/A models TestModel testfile N/A File N/A self test_file N/A N/A N/A obj save N/A N/A N/A N/A N/A N/A obj testfile storage result get N/A N/A N/A self assertFalse N/A N/A path isfile N/A N/A path join N/A self local_dir N/A N/A obj testfile name Local file is still available N/A N/A N/A self assertTrue N/A N/A path isfile N/A N/A path join N/A self remote_dir N/A N/A obj testfile name Remote file is not available. N/A test_transfer_returns_boolean N/A N/A self N/A N/A N/A 
        Make sure an exception is thrown when the transfer task does not return
        a boolean. We don't want to confuse Celery.
         N/A storage N/A QueuedStorage local django.core.files.storage.FileSystemStorage remote django.core.files.storage.FileSystemStorage local_options N/A dict location N/A self local_dir remote_options N/A dict location N/A self remote_dir task tests.tasks.NoneReturningTask N/A field N/A N/A N/A N/A models TestModel _meta get_field testfile N/A N/A field storage storage N/A obj N/A N/A models TestModel testfile N/A File N/A self test_file N/A N/A N/A obj save N/A N/A N/A self assertRaises ValueError N/A N/A N/A N/A obj testfile storage result get propagate True N/A test_transfer_retried N/A N/A self N/A N/A N/A 
        Make sure the transfer task is retried correctly.
         N/A storage N/A QueuedStorage local django.core.files.storage.FileSystemStorage remote django.core.files.storage.FileSystemStorage local_options N/A dict location N/A self local_dir remote_options N/A dict location N/A self remote_dir task tests.tasks.RetryingTask N/A field N/A N/A N/A N/A models TestModel _meta get_field testfile N/A N/A field storage storage N/A N/A N/A self assertFalse N/A N/A models TestModel retried N/A obj N/A N/A models TestModel testfile N/A File N/A self test_file N/A N/A N/A obj save N/A N/A N/A self assertFalse N/A N/A N/A N/A N/A obj testfile storage result get N/A N/A N/A self assertTrue N/A N/A models TestModel retried N/A test_delayed_storage N/A N/A self N/A N/A N/A storage N/A QueuedStorage local django.core.files.storage.FileSystemStorage remote django.core.files.storage.FileSystemStorage local_options N/A dict location N/A self local_dir remote_options N/A dict location N/A self remote_dir delayed True N/A field N/A N/A N/A N/A models TestModel _meta get_field testfile N/A N/A field storage storage N/A obj N/A N/A models TestModel testfile N/A File N/A self test_file N/A N/A N/A obj save N/A N/A N/A self assertIsNone N/A getattr N/A N/A obj testfile storage result None N/A N/A N/A self assertFalse N/A N/A path isfile N/A N/A path join N/A self remote_dir N/A N/A obj testfile name Remote file should not be transferred automatically. N/A result N/A N/A N/A N/A obj testfile storage transfer N/A N/A obj testfile name N/A N/A N/A result get N/A N/A N/A self assertTrue N/A N/A path isfile N/A N/A path join N/A self remote_dir N/A N/A obj testfile name Remote file is not available. N/A test_remote_file_field N/A N/A self N/A N/A N/A storage N/A QueuedStorage local django.core.files.storage.FileSystemStorage remote django.core.files.storage.FileSystemStorage local_options N/A dict location N/A self local_dir remote_options N/A dict location N/A self remote_dir delayed True N/A field N/A N/A N/A N/A models TestModel _meta get_field remote N/A N/A field storage storage N/A obj N/A N/A models TestModel remote N/A File N/A self test_file N/A N/A N/A obj save N/A N/A N/A self assertIsNone N/A getattr N/A N/A obj testfile storage result None N/A result N/A N/A N/A obj remote transfer N/A N/A N/A self assertTrue result N/A N/A N/A self assertTrue N/A N/A path isfile N/A N/A path join N/A self remote_dir N/A N/A obj remote name N/A N/A