diff options
author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-05-04 14:34:32 -0700 |
---|---|---|
committer | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-05-04 14:34:32 -0700 |
commit | e5b1faab05282cc2f26f452bed8acf7cb6935089 (patch) | |
tree | 3c5bd9f34cdd06815e533de6a5354698c57d510c /pystache | |
parent | 661b3ecd9a358ae0095949bde832b063568a294c (diff) | |
download | pystache-e5b1faab05282cc2f26f452bed8acf7cb6935089.tar.gz |
Fixed unittest warnings with Python 3: assertEquals() is deprecated.
Diffstat (limited to 'pystache')
-rw-r--r-- | pystache/tests/test_context.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pystache/tests/test_context.py b/pystache/tests/test_context.py index 0c5097b..d432428 100644 --- a/pystache/tests/test_context.py +++ b/pystache/tests/test_context.py @@ -408,18 +408,18 @@ class ContextStackTests(unittest.TestCase, AssertIsMixin, AssertStringMixin): def test_dot_notation__user_object(self): name = "foo.bar" stack = ContextStack({"foo": Attachable(bar="baz")}) - self.assertEquals(stack.get(name), "baz") + self.assertEqual(stack.get(name), "baz") # Works on multiple levels, too name = "a.b.c.d.e.f.g" A = Attachable stack = ContextStack({"a": A(b=A(c=A(d=A(e=A(f=A(g="w00t!"))))))}) - self.assertEquals(stack.get(name), "w00t!") + self.assertEqual(stack.get(name), "w00t!") def test_dot_notation__mixed_dict_and_obj(self): name = "foo.bar.baz.bak" stack = ContextStack({"foo": Attachable(bar={"baz": Attachable(bak=42)})}) - self.assertEquals(stack.get(name), 42) + self.assertEqual(stack.get(name), 42) def test_dot_notation__missing_attr_or_key(self): name = "foo.bar.baz.bak" @@ -460,11 +460,11 @@ class ContextStackTests(unittest.TestCase, AssertIsMixin, AssertStringMixin): # When any element in the path is callable, it should be automatically invoked stack = ContextStack({"foo": Attachable(bar=Attachable(baz=lambda: "Called!"))}) - self.assertEquals(stack.get(name), "Called!") + self.assertEqual(stack.get(name), "Called!") class Foo(object): def bar(self): return Attachable(baz='Baz') stack = ContextStack({"foo": Foo()}) - self.assertEquals(stack.get(name), "Baz") + self.assertEqual(stack.get(name), "Baz") |