~ubuntu-branches/ubuntu/trusty/ubuntuone-client/trusty-proposed

« back to all changes in this revision

Viewing changes to tests/platform/sync_menu/test_common.py

  • Committer: Package Import Robot
  • Author(s): Rodney Dawes
  • Date: 2012-10-03 11:07:27 UTC
  • mfrom: (1.1.75)
  • Revision ID: package-import@ubuntu.com-20121003110727-twy7j76gz07k8pj0
Tags: 4.0.0-0ubuntu1
* New upstream release.
  - Clicking U1 icon in messaging menu doesn't work. (LP: #1059571)
  - Opening Ubuntu One from sync indicator menu doesn't work. (LP: #1058334)
  - Excessive CPU usage with sync menu integration. (LP: #1052922)
  - Re-order transfers in sync menu to be more useful. (LP: #1052956)
  - Don't fail when sync menu is not available. (LP: #1053775)
  - Fix missing icon in dash and alt+tab. (LP: #1053519)
* debian/patches:
  - Remove patches included in new upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 *-*
 
2
#
 
3
# Copyright 2012 Canonical Ltd.
 
4
#
 
5
# This program is free software: you can redistribute it and/or modify it
 
6
# under the terms of the GNU General Public License version 3, as published
 
7
# by the Free Software Foundation.
 
8
#
 
9
# This program is distributed in the hope that it will be useful, but
 
10
# WITHOUT ANY WARRANTY; without even the implied warranties of
 
11
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
12
# PURPOSE.  See the GNU General Public License for more details.
 
13
#
 
14
# You should have received a copy of the GNU General Public License along
 
15
# with this program.  If not, see <http://www.gnu.org/licenses/>.
 
16
#
 
17
# In addition, as a special exception, the copyright holders give
 
18
# permission to link the code of portions of this program with the
 
19
# OpenSSL library under certain conditions as described in each
 
20
# individual source file, and distribute linked combinations
 
21
# including the two.
 
22
# You must obey the GNU General Public License in all respects
 
23
# for all of the code used other than OpenSSL.  If you modify
 
24
# file(s) with this exception, you may extend this exception to your
 
25
# version of the file(s), but you are not obligated to do so.  If you
 
26
# do not wish to do so, delete this exception statement from your
 
27
# version.  If you delete this exception statement from all source
 
28
# files in the program, then also delete it here.
 
29
"""Test the common dummy Sync Menu implementation for win32/darwin."""
 
30
 
 
31
from collections import Callable
 
32
 
 
33
from twisted.trial.unittest import TestCase
 
34
 
 
35
from ubuntuone.platform.sync_menu import common
 
36
 
 
37
 
 
38
class SyncMenuDummyTestCase(TestCase):
 
39
    """Test the SyncMenu."""
 
40
 
 
41
    def test_dummy_support(self):
 
42
        """Can we create a Dummy with the same #args as the real obj."""
 
43
        dummy = common.UbuntuOneSyncMenu(1, 2)
 
44
        self.assertIsInstance(dummy, common.UbuntuOneSyncMenu)
 
45
 
 
46
    def test_dummy_has_update_transfers(self):
 
47
        """Check that the dummy has the proper methods required by the API."""
 
48
        dummy = common.UbuntuOneSyncMenu(1, 2)
 
49
        self.assertIsInstance(dummy.update_transfers, Callable)