[Telepathy-commits] [telepathy-gabble/master] tests: add Chat State xmlns to ns.py

Will Thompson will.thompson at collabora.co.uk
Tue Feb 3 06:34:50 PST 2009


---
 tests/twisted/ns.py                     |    1 +
 tests/twisted/text/test-text-no-body.py |    6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/twisted/ns.py b/tests/twisted/ns.py
index e0d0aa0..8f49e49 100644
--- a/tests/twisted/ns.py
+++ b/tests/twisted/ns.py
@@ -1,4 +1,5 @@
 AMP = "http://jabber.org/protocol/amp"
+CHAT_STATES = 'http://jabber.org/protocol/chatstates'
 DISCO_INFO = "http://jabber.org/protocol/disco#info"
 DISCO_ITEMS = "http://jabber.org/protocol/disco#items"
 MUC = 'http://jabber.org/protocol/muc'
diff --git a/tests/twisted/text/test-text-no-body.py b/tests/twisted/text/test-text-no-body.py
index 9593872..d14c4d1 100644
--- a/tests/twisted/text/test-text-no-body.py
+++ b/tests/twisted/text/test-text-no-body.py
@@ -8,6 +8,8 @@ from twisted.words.xish import domish
 
 from gabbletest import exec_test
 
+import ns
+
 def test(q, bus, conn, stream):
     conn.Connect()
     q.expect('dbus-signal', signal='StatusChanged', args=[0, 1])
@@ -16,14 +18,14 @@ def test(q, bus, conn, stream):
     m = domish.Element(('', 'message'))
     m['from'] = 'alice at foo.com'
     m['type'] = 'chat'
-    m.addElement(('http://jabber.org/protocol/chatstates', 'composing'))
+    m.addElement((ns.CHAT_STATES, 'composing'))
     stream.send(m)
 
     # message with body
     m = domish.Element(('', 'message'))
     m['from'] = 'bob at foo.com'
     m['type'] = 'chat'
-    m.addElement(('http://jabber.org/protocol/chatstates', 'composing'))
+    m.addElement((ns.CHAT_STATES, 'composing'))
     m.addElement('body', content='hello')
     stream.send(m)
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list