Bug 42306 - caps/tube-caps.py's caps assertions don't work
Summary: caps/tube-caps.py's caps assertions don't work
Status: RESOLVED MOVED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-27 04:14 UTC by Jonny Lamb
Modified: 2019-12-03 19:54 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
half a patch to fix this (13.62 KB, patch)
2011-10-27 04:15 UTC, Jonny Lamb
Details | Splinter Review

Description Jonny Lamb 2011-10-27 04:14:20 UTC
sorted({1:[...]}) = [1]

535439ebe90229c87dff5e unfortunately introduced an assertSameElements function which doesn't remember that sorted() on a dict listifies it. Admittedly, I'm not sure I knew that.

Anyway, we should fix it, as this passes:

assertSameElements({1: {'foo':'bar'}},
                   {1: {'baz':'cheese'}})
Comment 1 Jonny Lamb 2011-10-27 04:15:51 UTC
Created attachment 52820 [details] [review]
half a patch to fix this

Here's a patch but it still fails on:

Traceback (most recent call last):
  File "/home/jonny/src/telepathy-gabble/tests/twisted/gabbletest.py", line 634, in exec_test_deferred
    fun(queue, bus, conns[0], streams[0])
  File "./caps/tube-caps.py", line 366, in test
    test_tube_caps_to_contact(q, bus, conn, stream)
  File "./caps/tube-caps.py", line 319, in test_tube_caps_to_contact
    daap_caps)
  File "./caps/tube-caps.py", line 233, in advertise_caps
    assertContains(var, namespaces)
  File "/home/jonny/src/telepathy-gabble/tests/twisted/servicetest.py", line 578, in assertContains
    "expected:\n%s\nin:\n%s" % (pretty(element), pretty(value)))
AssertionError: expected:
'http://telepathy.freedesktop.org/xmpp/tubes/stream#daap'
in:
[u'http://www.google.com/xmpp/protocol/session',
 u'urn:xmpp:jingle:transports:raw-udp:1',
 u'http://jabber.org/protocol/jingle',
 u'urn:xmpp:jingle:1',
 u'http://jabber.org/protocol/chatstates',
 u'http://jabber.org/protocol/nick',
 u'http://jabber.org/protocol/nick+notify',
 u'http://jabber.org/protocol/si',
 u'http://jabber.org/protocol/ibb',
 u'http://telepathy.freedesktop.org/xmpp/tubes',
 u'http://jabber.org/protocol/bytestreams',
 u'jabber:iq:version',
 u'im:telepathy:file-transfer:metadata']
FAIL: caps/tube-caps.py

I don't feel like digging through the tube caps stuff right now though, and I'm not sure if this is actually a problem in gabble or the test.
Comment 2 GitLab Migration User 2019-12-03 19:54:19 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-gabble/issues/186.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.