Permalink
Browse files

Fixed tests for django<1.4 by making MockStorage instances iterable

  • Loading branch information...
1 parent 9806995 commit 013758cd00bc30e62dea577291a5f38445eebb78 @kux kux committed Oct 3, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 cms/test_utils/testcases.py
@@ -222,6 +222,12 @@ def get_request(self, path=None, language=None, post_data=None, enforce_csrf_che
class MockStorage(object):
+ def __len__(self):
+ return 0
+
+ def __iter__(self):
+ return iter([])
+
def add(self, level, message, extra_tags=''):
pass

0 comments on commit 013758c

Please sign in to comment.