Skip to content

Instantly share code, notes, and snippets.

@andymckay
Created November 1, 2010 20:21
Show Gist options
  • Save andymckay/658794 to your computer and use it in GitHub Desktop.
Save andymckay/658794 to your computer and use it in GitHub Desktop.
diff --git a/apps/files/tests.py b/apps/files/tests.py
index 2b699cb..6f0c318 100644
--- a/apps/files/tests.py
+++ b/apps/files/tests.py
@@ -29,7 +29,7 @@ class TestFile(test_utils.TestCase):
filesystem """
file = File.objects.get(pk=67442)
filename = file.file_path
- if not os.path.exists:
+ if not os.path.exists(os.path.dirname(filename)):
os.makedirs(os.path.dirname(filename))
assert not os.path.exists(filename), 'File exists at: %s' % filename
try:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment