summaryrefslogtreecommitdiff
path: root/tests/test_tostring.py
diff options
context:
space:
mode:
authorFlorian Klien <flowolf@klienux.org>2018-10-08 23:25:23 +0200
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-10-15 14:59:23 +0200
commitd33366badde6a2d51be8d731834540c03b9a6c49 (patch)
tree8ecbb3de477371a29e95f1aa4d93b619bfa5f5e4 /tests/test_tostring.py
parent809c50000204f8724bac80cb3359a690fdbc839e (diff)
downloadslixmpp-d33366badde6a2d51be8d731834540c03b9a6c49.tar.gz
slixmpp-d33366badde6a2d51be8d731834540c03b9a6c49.tar.bz2
slixmpp-d33366badde6a2d51be8d731834540c03b9a6c49.tar.xz
slixmpp-d33366badde6a2d51be8d731834540c03b9a6c49.zip
fixing deprecation warnings for pytest
Diffstat (limited to 'tests/test_tostring.py')
-rw-r--r--tests/test_tostring.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_tostring.py b/tests/test_tostring.py
index 72718beb..6bc7204f 100644
--- a/tests/test_tostring.py
+++ b/tests/test_tostring.py
@@ -25,7 +25,7 @@ class TestToString(SlixTest):
else:
xml=original
result = tostring(xml, **kwargs)
- self.failUnless(result == expected, "%s: %s" % (message, result))
+ self.assertTrue(result == expected, "%s: %s" % (message, result))
def testXMLEscape(self):
"""Test escaping XML special characters."""
@@ -34,7 +34,7 @@ class TestToString(SlixTest):
desired = """&lt;foo bar=&quot;baz&quot;&gt;&apos;Hi"""
desired += """ &amp; welcome!&apos;&lt;/foo&gt;"""
- self.failUnless(escaped == desired,
+ self.assertTrue(escaped == desired,
"XML escaping did not work: %s." % escaped)
def testEmptyElement(self):
@@ -99,7 +99,7 @@ class TestToString(SlixTest):
msg['body'] = utf8_message.decode('utf-8')
expected = '<message><body>\xe0\xb2\xa0_\xe0\xb2\xa0</body></message>'
result = msg.__str__()
- self.failUnless(result == expected,
+ self.assertTrue(result == expected,
"Stanza Unicode handling is incorrect: %s" % result)
def testXMLLang(self):
@@ -112,7 +112,7 @@ class TestToString(SlixTest):
expected = '<message xml:lang="no" />'
result = msg.__str__()
- self.failUnless(expected == result,
+ self.assertTrue(expected == result,
"Serialization with xml:lang failed: %s" % result)