浏览代码

[desktop] nose on Python 2.6 does not support assert_is

Erick Tryzelaar 11 年之前
父节点
当前提交
d482340
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      desktop/core/src/desktop/redaction/tests.py

+ 2 - 2
desktop/core/src/desktop/redaction/tests.py

@@ -23,7 +23,7 @@ from desktop.redaction.engine import RedactionEngine, \
                                      parse_redaction_rules_from_string, \
                                      parse_redaction_rules_from_file
 from desktop.redaction.logfilter import add_log_redaction_filter_to_logger
-from nose.tools import assert_is, assert_equal, assert_not_equal
+from nose.tools import assert_true, assert_equal, assert_not_equal
 
 
 class MockLoggingHandler(logging.Handler):
@@ -56,7 +56,7 @@ class TestRedactionRule(object):
     rule = RedactionRule('password=', 'password=".*"', 'password="???"')
 
     message = 'message'
-    assert_is(rule.redact(message), message)
+    assert_true(rule.redact(message) is message)
 
   def test_equality(self):
     rule1 = RedactionRule('password=', 'password=".*"', 'password="???"')