Esempio n. 1
0
class TestStorageFile(test.SimpleTestCase):
    def setUp(self):
        self.filename = joinpath(MEDIA_ROOT, "random.txt")
        self.file_storage = FileSystemStorage(MEDIA_ROOT)
        self.file = StorageFile()

    def test_some(self):
        self.file.store(self.file_storage, File(open(self.filename)))
        print(self.file.data)
Esempio n. 2
0
class TestStorageFile(test.SimpleTestCase):

    def setUp(self):
        self.filename = joinpath(MEDIA_ROOT, "random.txt")
        self.file_storage = FileSystemStorage(MEDIA_ROOT)
        self.file = StorageFile()

    def test_some(self):
        self.file.store(self.file_storage, File(open(self.filename)))
        print(self.file.data)
Esempio n. 3
0
 def setUp(self):
     self.filename = joinpath(MEDIA_ROOT, "random.txt")
     self.file_storage = FileSystemStorage(MEDIA_ROOT)
     self.file = StorageFile()
Esempio n. 4
0
 def setUp(self):
     self.filename = joinpath(MEDIA_ROOT, "random.txt")
     self.file_storage = FileSystemStorage(MEDIA_ROOT)
     self.file = StorageFile()