summaryrefslogtreecommitdiff
path: root/sleekxmpp/test/sleektest.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-02-02 09:13:22 -0500
committerLance Stout <lancestout@gmail.com>2011-02-02 09:13:22 -0500
commitde6170a13de2dbb3cbcfbf4a74b749f20b0cf061 (patch)
treeb60043234119a3d215e0eca65913dd038167b551 /sleekxmpp/test/sleektest.py
parent65931bb384aada922c5287a3ad3cc62d04d6e676 (diff)
parent8dbe6f65462ec9b1a0506a00316415996f4d53d8 (diff)
downloadslixmpp-de6170a13de2dbb3cbcfbf4a74b749f20b0cf061.tar.gz
slixmpp-de6170a13de2dbb3cbcfbf4a74b749f20b0cf061.tar.bz2
slixmpp-de6170a13de2dbb3cbcfbf4a74b749f20b0cf061.tar.xz
slixmpp-de6170a13de2dbb3cbcfbf4a74b749f20b0cf061.zip
Merge branch 'develop' into roster
Conflicts: sleekxmpp/basexmpp.py
Diffstat (limited to 'sleekxmpp/test/sleektest.py')
-rw-r--r--sleekxmpp/test/sleektest.py23
1 files changed, 10 insertions, 13 deletions
diff --git a/sleekxmpp/test/sleektest.py b/sleekxmpp/test/sleektest.py
index ce582e3a..b4c912b4 100644
--- a/sleekxmpp/test/sleektest.py
+++ b/sleekxmpp/test/sleektest.py
@@ -183,8 +183,7 @@ class SleekTest(unittest.TestCase):
"""
Create and compare several stanza objects to a correct XML string.
- If use_values is False, test using getStanzaValues() and
- setStanzaValues() will not be used.
+ If use_values is False, tests using stanza.values will not be used.
Some stanzas provide default values for some interfaces, but
these defaults can be problematic for testing since they can easily
@@ -207,9 +206,8 @@ class SleekTest(unittest.TestCase):
values. These interfaces will be set to their
defaults for the given and generated stanzas to
prevent unexpected test failures.
- use_values -- Indicates if testing using getStanzaValues() and
- setStanzaValues() should be used. Defaults to
- True.
+ use_values -- Indicates if testing using stanza.values should
+ be used. Defaults to True.
"""
if method is None and hasattr(self, 'match_method'):
method = getattr(self, 'match_method')
@@ -242,10 +240,10 @@ class SleekTest(unittest.TestCase):
stanza2 = stanza_class(xml=xml)
if use_values:
- # Using getStanzaValues() and setStanzaValues() will add
- # XML for any interface that has a default value. We need
- # to set those defaults on the existing stanzas and XML
- # so that they will compare correctly.
+ # Using stanza.values will add XML for any interface that
+ # has a default value. We need to set those defaults on
+ # the existing stanzas and XML so that they will compare
+ # correctly.
default_stanza = stanza_class()
if defaults is None:
known_defaults = {
@@ -264,9 +262,9 @@ class SleekTest(unittest.TestCase):
value = default_stanza.xml.attrib[interface]
xml.attrib[interface] = value
- values = stanza2.getStanzaValues()
+ values = stanza2.values
stanza3 = stanza_class()
- stanza3.setStanzaValues(values)
+ stanza3.values = values
debug = "Three methods for creating stanzas do not match.\n"
debug += "Given XML:\n%s\n" % tostring(xml)
@@ -416,8 +414,7 @@ class SleekTest(unittest.TestCase):
'id', 'stanzapath', 'xpath', and 'mask'.
Defaults to the value of self.match_method.
use_values -- Indicates if stanza comparisons should test using
- getStanzaValues() and setStanzaValues().
- Defaults to True.
+ stanza.values. Defaults to True.
timeout -- Time to wait in seconds for data to be received by
a live connection.
"""