Skip to content
This repository
Browse code

Fixed tests for django<1.4 by making MockStorage instances iterable

  • Loading branch information...
commit 013758cd00bc30e62dea577291a5f38445eebb78 1 parent 9806995
Ioan Alexandru Cucu authored October 03, 2012

Showing 1 changed file with 6 additions and 0 deletions. Show diff stats Hide diff stats

  1. 6  cms/test_utils/testcases.py
6  cms/test_utils/testcases.py
@@ -222,6 +222,12 @@ def get_request(self, path=None, language=None, post_data=None, enforce_csrf_che
222 222
 
223 223
         class MockStorage(object):
224 224
 
  225
+            def __len__(self):
  226
+                return 0
  227
+
  228
+            def __iter__(self):
  229
+                return iter([])
  230
+
225 231
             def add(self, level, message, extra_tags=''):
226 232
                 pass
227 233
 

0 notes on commit 013758c

Please sign in to comment.
Something went wrong with that request. Please try again.