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)
def setUp(self): self.filename = joinpath(MEDIA_ROOT, "random.txt") self.file_storage = FileSystemStorage(MEDIA_ROOT) self.file = StorageFile()