[telepathy-salut/master] test-caps-self: use check_caps from caps_helper

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Mon Mar 30 09:55:36 PDT 2009


---
 tests/twisted/avahi/test-caps-self.py |   17 +----------------
 1 files changed, 1 insertions(+), 16 deletions(-)

diff --git a/tests/twisted/avahi/test-caps-self.py b/tests/twisted/avahi/test-caps-self.py
index 5e8ab53..089ba00 100644
--- a/tests/twisted/avahi/test-caps-self.py
+++ b/tests/twisted/avahi/test-caps-self.py
@@ -14,7 +14,7 @@ from servicetest import make_channel_proxy
 from saluttest import fixed_features
 
 from twisted.words.xish import xpath, domish
-from caps_helper import compute_caps_hash
+from caps_helper import compute_caps_hash, check_caps
 from config import PACKAGE_STRING
 import ns
 
@@ -25,21 +25,6 @@ HT_CONTACT = 1
 caps_iface = 'org.freedesktop.Telepathy.' + \
              'Connection.Interface.ContactCapabilities.DRAFT'
 
-def check_caps(txt, ver):
-    for (key, val) in { "1st": "test",
-                        "last": "suite",
-                        "status": "avail",
-                        "txtvers": "1" }.iteritems():
-        v =  txt_get_key(txt, key)
-        assert v == val, (key, val, v)
-
-    assert txt_get_key(txt, "hash") == "sha-1"
-    assert txt_get_key(txt, "node") == ns.TELEPATHY_CAPS
-
-    v = txt_get_key(txt, "ver")
-    assert v == ver, (v, ver)
-
-
 def test(q, bus, conn):
     # last value of the "ver" key we resolved. We use it to be sure that the
     # modified caps has already be announced.
-- 
1.5.6.5




More information about the telepathy-commits mailing list