[telepathy-gabble/telepathy-gabble-0.8] compute_caps_hash(): verify that identities are well-formed
Dafydd Harries
dafydd.harries at collabora.co.uk
Thu Jan 7 17:18:49 PST 2010
---
tests/twisted/caps_helper.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/tests/twisted/caps_helper.py b/tests/twisted/caps_helper.py
index 0de83eb..82d2d1b 100644
--- a/tests/twisted/caps_helper.py
+++ b/tests/twisted/caps_helper.py
@@ -137,6 +137,11 @@ def compute_caps_hash(identities, features, dataforms):
components = []
for identity in sorted(identities):
+ if len(identity.split('/')) != 4:
+ raise ValueError(
+ "expecting identities of the form " +
+ "'category/type/lang/client': got " + repr(identity))
+
components.append(identity)
for feature in sorted(features):
--
1.5.6.5
More information about the telepathy-commits
mailing list