Commit 021e6f5b by Usman Khalid

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

Replaces print statement in django_comment_client with unicode log.debug.
parents c8797ac2 8b6e3b44
# -*- 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)
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment