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