[Telepathy-commits] [telepathy-salut/master] remove generate_caps as it's not really useful

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Thu Feb 26 11:20:24 PST 2009


---
 tests/twisted/avahi/caps_helper.py    |    4 ----
 tests/twisted/avahi/test-caps-self.py |    5 +++--
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/tests/twisted/avahi/caps_helper.py b/tests/twisted/avahi/caps_helper.py
index 95099d1..251bac9 100644
--- a/tests/twisted/avahi/caps_helper.py
+++ b/tests/twisted/avahi/caps_helper.py
@@ -1,6 +1,5 @@
 import hashlib
 import base64
-from config import PACKAGE_STRING
 
 def compute_caps_hash(identities, features, dataforms):
     S = ''
@@ -17,9 +16,6 @@ def compute_caps_hash(identities, features, dataforms):
     m.update(S)
     return base64.b64encode(m.digest())
 
-def generate_caps(features):
-    return compute_caps_hash(['client/pc//%s' % PACKAGE_STRING], features, [])
-
 if __name__ == '__main__':
     # example from XEP-0115
     assert compute_caps_hash(['client/pc//Exodus 0.9.1'], ["http://jabber.org/protocol/disco#info",
diff --git a/tests/twisted/avahi/test-caps-self.py b/tests/twisted/avahi/test-caps-self.py
index 30b30b3..3105e95 100644
--- a/tests/twisted/avahi/test-caps-self.py
+++ b/tests/twisted/avahi/test-caps-self.py
@@ -13,7 +13,8 @@ from xmppstream import setup_stream_listener, connect_to_stream
 from servicetest import make_channel_proxy
 
 from twisted.words.xish import xpath, domish
-from caps_helper import generate_caps
+from caps_helper import compute_caps_hash
+from config import PACKAGE_STRING
 
 import time
 import dbus
@@ -65,7 +66,7 @@ def test(q, bus, conn):
 
     e = q.expect('service-resolved', service = service)
 
-    caps = generate_caps([])
+    caps = compute_caps_hash(['client/pc//%s' % PACKAGE_STRING], [], [])
     check_caps(e.txt, ver=caps)
 
 if __name__ == '__main__':
-- 
1.5.6.5




More information about the telepathy-commits mailing list