~ubuntu-branches/ubuntu/oneiric/ubuntuone-client/oneiric

« back to all changes in this revision

Viewing changes to tests/syncdaemon/test_eq_inotify.py

  • Committer: Bazaar Package Importer
  • Author(s): Rodney Dawes
  • Date: 2011-02-23 18:34:09 UTC
  • mfrom: (1.1.45 upstream)
  • Revision ID: james.westby@ubuntu.com-20110223183409-535o7yo165wbjmca
Tags: 1.5.5-0ubuntu1
* New upstream release.
  - Subscribing to a RO share will not download content (LP: #712528)
  - Can't synchronize "~/Ubuntu One Music" (LP: #714976)
  - Syncdaemon needs to show progress in Unity launcher (LP: #702116)
  - Notifications say "your cloud" (LP: #715887)
  - No longer requires python-libproxy
  - Recommend unity and indicator libs by default

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
        """Typical method faker."""
84
84
        if not name.startswith("handle_"):
85
85
            return
86
 
 
87
86
        asked_event = name[7:]
88
87
 
89
 
        # to what we should match
90
 
        step, should_evtname, should_args = self.should_events.pop()
91
 
 
92
 
        def to_check(**asked_args):
 
88
        def to_check(asked_event, **asked_args):
93
89
            """The function that actually be called."""
 
90
            # to what we should match
 
91
            step, should_evtname, should_args = self.should_events.pop()
 
92
 
 
93
            if should_evtname != asked_event:
 
94
                msg = "Event %r asked in bad order (%d)" % (asked_event, step)
 
95
                self.test_machinery.finished_error(msg)
 
96
 
94
97
            if asked_args != should_args:
95
98
                self.test_machinery.finished_error(
96
99
                    "In step %d received wrong args (%r)" % (step, asked_args))
98
101
                if step == self.final_step:
99
102
                    self.test_machinery.finished_ok()
100
103
 
101
 
        if should_evtname != asked_event:
102
 
            msg = "Event %r asked in bad order (%d)" % (asked_event, step)
103
 
            self.test_machinery.finished_error(msg)
104
 
        else:
105
 
            return to_check
 
104
        return functools.partial(to_check, asked_event)
106
105
 
107
106
 
108
107
class BaseTwisted(BaseEQTestCase):