~facundo/magicicada-client/changes-for-xenial

« back to all changes in this revision

Viewing changes to tests/platform/filesystem_notifications/test_fsevents_daemon.py

  • Committer: Magicicada Bot
  • Author(s): Natalia
  • Date: 2015-09-20 21:39:25 UTC
  • mfrom: (1414.1.1 fix-import-txsocketserver)
  • Revision ID: magicicada_bot-20150920213925-ovekik3mehip6sol
[r=nataliabidart] - Add try-except for devtools modules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
from contrib.testing.testcase import BaseTwistedTestCase
36
36
from ubuntuone import fseventsd
37
 
from ubuntuone.devtools.testcases.txsocketserver import TidyUnixServer
 
37
try:
 
38
    from ubuntuone.devtools.testcases import skipIf
 
39
    from ubuntuone.devtools.testcases.txsocketserver import TidyUnixServer
 
40
    TidyUnixServer = None
 
41
except ImportError:
 
42
    from ubuntuone.devtools.testcase import skipIf
 
43
    TidyUnixServer = None
38
44
from ubuntuone.platform.filesystem_notifications.monitor.darwin import (
39
45
    fsevents_daemon,
40
46
)
100
106
        self.called = []
101
107
 
102
108
    def loseConnection(self):
103
 
        """"Lost the connection."""
 
109
        """Lost the connection."""
104
110
        self.called.append('loseConnection')
105
111
 
106
112
 
460
466
        yield self.monitor.add_watch(dirpath)
461
467
        self.assertNotIn('add_path', self.protocol.called)
462
468
 
 
469
    @skipIf(TidyUnixServer is None,
 
470
            'Testcases from txsocketserver not availble.')
463
471
    @defer.inlineCallbacks
464
472
    def test_is_available_monitor_running(self):
465
473
        """Test the method when it is indeed running."""