Please sign in to comment.
Filters should not be required to use thumbor. Fixes #138.
Filters should not be required to use thumbor. If filters have not been compiled properly and an user tries to use them, we should give meaningful messages saying that they are not available and direct the user to reinstall thumbor with the filters compiled properly.
- Loading branch information...
Showing with 40 additions and 2 deletions.
|@@ -0,0 +1,29 @@|
|+# -*- coding: utf-8 -*-|
|+# thumbor imaging service|
|+# Licensed under the MIT license:|
|+# Copyright (c) 2011 globo.com email@example.com|
|+from pyvows import Vows, expect|
|+ctx = Vows.Context|
|+import thumbor.engines.pil as PIL|
|+ class ShouldRaiseIfFiltersNotAvailable(ctx):|
|+ def topic(self):|
|+ PIL.FILTERS_AVAILABLE = False|
|+ engine = PIL.Engine(None)|
|+ return engine.paste(None, None, True)|
|+ def should_be_an_error(self, topic):|
|+ expect(topic).to_have_an_error_message_of('You need filters enabled to use paste with merge. Please reinstall thumbor with proper compilation of its filters.')|