def test_uninitialized(self): cwd = os.getcwd() os.chdir('/') with self.assertRaises(exceptions.UninitializedError): action = Action(os.getcwd()) os.chdir( cwd ) # change back to this directory so rest of the tests will work
def __init__(self, path=None, timeout=60): Action.__init__(self, path, True, timeout) self.observers = [] # watchdog observers that will watch the files self.handler = WatchHandler() self.handler.on_modified = self._on_modified self.handler.on_created = self._on_created self.handler.on_moved = self._on_moved self.watch_queue = [ ] # not much slower than deque unless expecting 100+ items self.locale_delimiter = None self.ignore_ext = [] # file types to ignore as specified by the user self.detected_locales = {} # dict to keep track of detected locales self.watch_folder = True self.timeout = timeout self.updated = {} self.git_auto = Git_Auto(path) self.polled_list = set([]) self.force_poll = False self.add = add_action.AddAction(path) self.download = download_action.DownloadAction(path) self.root_path = path self.download_file_paths = set() # set of download file path names
def test_doc_manager(self): create_config() action = Action(os.getcwd()) assert action.doc_manager action.close() cleanup()
def test_api(self): create_config() action = Action(os.getcwd()) assert action.api action.close() cleanup()
def test_community_id(self): create_config() action = Action(os.getcwd()) assert action.community_id action.close() cleanup()
def test_path(self): create_config() action = Action(os.getcwd()) assert action.path action.close() cleanup()
def test_project_id(self): create_config() action = Action(os.getcwd()) assert action.project_id action.close() cleanup()
def test_access_token(self): create_config() action = Action(os.getcwd()) assert action.access_token action.close() cleanup()