[Bug 37283] Don't leave "away" when the shared status is remotely changed

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue May 17 15:31:24 CEST 2011


https://bugs.freedesktop.org/show_bug.cgi?id=37283

--- Comment #2 from Will Thompson <will.thompson at collabora.co.uk> 2011-05-17 06:31:24 PDT ---
The code looks fine, as does the behaviour change; I have a couple of nitpicks
on the test. Thinking about it, the complexity here is because we don't have a
concept of shared status in the Telepathy API, so we're trying to squish two
concepts into one. :)

+    list_attrs['status'] = list_attrs.get('status') or msg

I think this means the same as list_attrs.get('status', msg) which I find
clearer.

Hmm, I wonder if we could have test API like this:

class ForbiddenDBusEvents(object):
    def __init__(self, q, *patterns):
        self.q = q
        self.patterns = patterns

    def enter(self):
        self.q.forbid_events(self.patterns)

    def exit(self):
        sync_dbus(q, ...)
        self.q.unforbid_events(self.patterns)

and then we could use:

    with ForbiddenDBusEvents(q, EventPattern(...), ...):
        do some testing

+    # Test that status doesn't change when we are away and the status is
+    # changed from another client.

I think maybe this deserves a little more explanation of what's being tested:
specifically, “Test that our own status as exposed over D-Bus doesn't change
when we are away and other clients change the shared status”, maybe?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the telepathy-bugs mailing list