~nataliabidart/magicicada-client/fix-travis-ubuntuone-clientdefs

« back to all changes in this revision

Viewing changes to magicicadaclient/syncdaemon/tests/test_vm.py

  • Committer: Natalia
  • Date: 2018-05-19 20:44:54 UTC
  • mto: This revision was merged to the branch mainline in revision 1445.
  • Revision ID: natalia.bidart@ubuntu.com-20180519204454-fliiqyexj67r7fp9
- Rename python package to magicicadaclient.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
from ubuntuone.devtools.handlers import MementoHandler
49
49
from ubuntuone.devtools.testcases import skipIfOS
50
50
 
51
 
from contrib.testing.testcase import (
 
51
from magicicadaclient.testing.testcase import (
52
52
    BaseTwistedTestCase,
53
53
    FakeMain,
54
54
)
55
 
from ubuntuone import platform
56
 
from ubuntuone.syncdaemon import config, event_queue, tritcask, volume_manager
57
 
from ubuntuone.syncdaemon.volume_manager import (
 
55
from magicicadaclient import platform
 
56
from magicicadaclient.syncdaemon import config, event_queue, tritcask, volume_manager
 
57
from magicicadaclient.syncdaemon.volume_manager import (
58
58
    ACCESS_LEVEL_RO,
59
59
    ACCESS_LEVEL_RW,
60
60
    get_udf_path,
72
72
    VMTritcaskShelf,
73
73
    VolumeDoesNotExist,
74
74
)
75
 
from ubuntuone.platform import (
 
75
from magicicadaclient.platform import (
76
76
    make_link,
77
77
    make_dir,
78
78
    open_file,
1922
1922
    def test_add_udf_with_content(self):
1923
1923
        """Test for VolumeManager.add_udf with content on disk."""
1924
1924
        # create a sync instance
1925
 
        from ubuntuone.syncdaemon import sync
 
1925
        from magicicadaclient.syncdaemon import sync
1926
1926
        sync = sync.Sync(self.main)
1927
1927
        suggested_path = u"~/suggested_path"
1928
1928
        udf = self._create_udf(suggested_path=suggested_path,
4131
4131
        files = ['not_yet.partial', ]
4132
4132
        mocker = Mocker()
4133
4133
        # ensure that we do use the platform method and not the renamed one
4134
 
        os_helper_rename = mocker.replace('ubuntuone.platform.rename')
 
4134
        os_helper_rename = mocker.replace('magicicadaclient.platform.rename')
4135
4135
 
4136
4136
        def is_string(x):
4137
4137
            return isinstance(x, str)
4148
4148
        mocker = Mocker()
4149
4149
        # ensure that we do use the platform method and not the renamed one
4150
4150
        self.md_upgrader._upgrade_metadata_6 = mocker.mock()
4151
 
        os_helper_rename = mocker.replace('ubuntuone.platform.rename')
 
4151
        os_helper_rename = mocker.replace('magicicadaclient.platform.rename')
4152
4152
 
4153
4153
        def is_string(x):
4154
4154
            return isinstance(x, str)