Exemplo n.º 1
0
 def test_info_plist_missing(self):
     """Info.plist missing"""
     delete_info_plist()
     try:
         with self.assertRaises(IOError):
             Workflow()
     finally:
         create_info_plist()
Exemplo n.º 2
0
    def tearDown(self):
        create_info_plist()
        self.wf.reset()
        try:
            self.wf.delete_password(self.account)
        except PasswordNotFound:
            pass

        for dirpath in (self.wf.cachedir, self.wf.datadir):
            if os.path.exists(dirpath):
                shutil.rmtree(dirpath)

        self._teardown_env()
        delete_info_plist()
Exemplo n.º 3
0
    def tearDown(self):
        create_info_plist()
        self.wf.reset()
        try:
            self.wf.delete_password(self.account)
        except PasswordNotFound:
            pass

        for dirpath in (self.wf.cachedir, self.wf.datadir):
            if os.path.exists(dirpath):
                shutil.rmtree(dirpath)

        self._teardown_env()
        delete_info_plist()
Exemplo n.º 4
0
def ctx(args=None, update_settings=None, clear=True):
    update_settings = update_settings or UPDATE_SETTINGS
    args = args or []
    c = dummy()
    if args:
        # Add placeholder for ARGV[0]
        args = ['script'] + args
    create_info_plist()
    if args:
        c = WorkflowMock(args)
    with c:
        wf = Workflow(update_settings=update_settings)
        yield wf, c
    if clear:
        wf.reset()
        delete_info_plist()
Exemplo n.º 5
0
 def tearDown(self):
     delete_info_plist()
Exemplo n.º 6
0
 def tearDown(self):
     delete_info_plist()