Created
November 30, 2011 14:01
-
-
Save alfredo/1409156 to your computer and use it in GitHub Desktop.
Create temporal file to test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.test import TestCase | |
from django.core.files.base import ContentFile | |
from django.core.files.storage import default_storage | |
class ToolsTest(TestCase): | |
def test_file(self): | |
"""Creates a tmp file""" | |
tmp_file = default_storage.save('tools/default.txt', | |
ContentFile('default content')) | |
default_storage.delete(tmp_file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment