From 190153d06864b64275fbd515c2f1a2b8c8a5cdba Mon Sep 17 00:00:00 2001 From: Matthew Tretter Date: Mon, 25 Feb 2013 22:15:57 -0500 Subject: [PATCH] Add test to ensure sourceless specs are falsy Currently failing; related to #187 --- tests/test_specs.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/test_specs.py diff --git a/tests/test_specs.py b/tests/test_specs.py new file mode 100644 index 0000000..6c8c4b9 --- /dev/null +++ b/tests/test_specs.py @@ -0,0 +1,12 @@ +from imagekit.cachefiles import ImageCacheFile +from nose.tools import assert_false +from .imagegenerators import TestSpec + + +def test_no_source(): + """ + Ensure sourceless specs are falsy. + """ + spec = TestSpec(source=None) + file = ImageCacheFile(spec) + assert_false(bool(file))