Пример #1
0
 def test_success_backup_in_media_file_debug(self):
     self.storage = FileSystemStorage(location=settings.MEDIA_ROOT)
Пример #2
0
 def test_success(self):
     self.storage = FileSystemStorage(location='foo')
Пример #3
0
 def test_fail_backup_in_media_file(self):
     with self.assertRaises(ImproperlyConfigured):
         self.storage = FileSystemStorage(location=settings.MEDIA_ROOT)
Пример #4
0
 def test_fail_no_location(self):
     with self.assertRaises(Exception):
         self.storage = FileSystemStorage()
Пример #5
0
 def test_fail_location_is_empty_str(self):
     with self.assertRaises(Exception):
         self.storage = FileSystemStorage(location='')
Пример #6
0
 def test_fail_location_is_none(self):
     with self.assertRaises(Exception):
         self.storage = FileSystemStorage(location=None)
Пример #7
0
 def setUp(self):
     self.temp_dir = tempfile.mkdtemp()
     self.storage = FileSystemStorage(location=self.temp_dir)