Merge pull request #2970 from edx/usman/lms2194-discussion-forum-unicode-error

Replaces print statement in django_comment_client with unicode log.debug.
This commit is contained in:
Usman Khalid
2014-03-20 17:36:57 +05:00
2 changed files with 4 additions and 2 deletions

View File

@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
import json
import mock
from datetime import datetime
@@ -296,7 +298,7 @@ class CategoryMapTestCase(ModuleStoreTestCase):
now = datetime.now()
later = datetime.max
self.create_discussion("Chapter 1", "Discussion 1", start=now)
self.create_discussion("Chapter 1", "Discussion 2", start=later)
self.create_discussion("Chapter 1", "Discussion 2 обсуждение", start=later)
self.create_discussion("Chapter 2", "Discussion", start=now)
self.create_discussion("Chapter 2 / Section 1 / Subsection 1", "Discussion", start=later)
self.create_discussion("Chapter 2 / Section 1 / Subsection 2", "Discussion", start=later)

View File

@@ -107,7 +107,7 @@ def _filter_unstarted_categories(category_map):
if key != "start_date":
filtered_map["entries"][child][key] = unfiltered_map["entries"][child][key]
else:
print "filtering %s" % child, unfiltered_map["entries"][child]["start_date"]
log.debug(u"Filtering out:%s with start_date: %s", child, unfiltered_map["entries"][child]["start_date"])
else:
if unfiltered_map["subcategories"][child]["start_date"] < now:
filtered_map["children"].append(child)