~robru/gwibber/twitter-from-me-fix

« back to all changes in this revision

Viewing changes to gwibber/gwibber/tests/test_flickr.py

  • Committer: Barry Warsaw
  • Date: 2012-09-12 22:15:43 UTC
  • mfrom: (1422.1.16 dispatcher)
  • Revision ID: barry@python.org-20120912221543-0bxi0xd5odp6sd6d
Merge lp:~robru/gwibber/dispatcher with his excellent rewrite of the
dispatcher code.  A few additional changes by barry:

 * check_all target of the Makefile should --clear any previous virtualenv
 * Fill out the twitter.py stub to also include logging and i18n so that the
   mock from test_twitter.py is more relevant.
 * PEP 8-ification of some names.
 * Moved on_connection_{online,offline} to non-public methods of Dispatcher
   for more idiomatic access to `self`.  Store the ctor argument `interval` in
   an instance variable.
 * Removed an unnecessary check from test_protocols.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
 
53
53
    def test_protocol_info(self):
54
54
        # Each protocol carries with it a number of protocol variables.
55
 
        self.assertEqual(self.protocol.name, 'Flickr')
56
 
        self.assertEqual(self.protocol.version, '1.0')
57
 
        self.assertEqual(self.protocol.config,
 
55
        self.assertEqual(self.protocol.__class__.__name__, 'Flickr')
 
56
        self.assertEqual(self.protocol.info.version, '1.0')
 
57
        self.assertEqual(self.protocol.info.config,
58
58
                         ['username', 'color', 'receive_enabled'])
59
 
        self.assertEqual(self.protocol.authtype, 'none')
60
 
        self.assertEqual(self.protocol.color, '#C31A00')
61
 
        self.assertEqual(self.protocol.features,
62
 
                         ['receive', 'images'])
63
 
        self.assertEqual(self.protocol.default_streams,
 
59
        self.assertEqual(self.protocol.info.authtype, 'none')
 
60
        self.assertEqual(self.protocol.info.color, '#C31A00')
 
61
        self.assertEqual(self.protocol.info.default_streams,
64
62
                         ['images'])
65
63
 
66
64
    def test_failed_login(self):