def test_getRecordingDirs_SingleDirectory(self): when(self.platform).getScriptDataDir().thenReturn(self.sandbox) settings = MythSettings(self.platform, self.translator) settings.put("paths_recordedprefix", "/mnt/mythtv") log.debug("Recording prefix = %s" % settings.get("paths_recordedprefix")) dirs = settings.getRecordingDirs() self.assertEquals(1, len(dirs)) self.assertEquals("/mnt/mythtv", dirs[0])
def test_getRecordingDirs_ManyDirectories(self): when(self.platform).getScriptDataDir().thenReturn(self.sandbox) settings = MythSettings(self.platform, self.translator) settings.put("paths_recordedprefix", os.pathsep.join(["a", "b", "c"])) log.debug("Recording prefix = %s" % settings.get("paths_recordedprefix")) dirs = settings.getRecordingDirs() self.assertEquals(3, len(dirs)) self.assertEquals(["a", "b", "c"], dirs)
def test_getRecordingDirs_SingleDirectory(self): when(self.platform).getScriptDataDir().thenReturn(self.sandbox) settings = MythSettings(self.platform, self.translator) settings.put('paths_recordedprefix', '/mnt/mythtv') log.debug("Recording prefix = %s" % settings.get('paths_recordedprefix')) dirs = settings.getRecordingDirs() self.assertEquals(1, len(dirs)) self.assertEquals('/mnt/mythtv', dirs[0])
def test_getRecordingDirs_ManyDirectories(self): when(self.platform).getScriptDataDir().thenReturn(self.sandbox) settings = MythSettings(self.platform, self.translator) settings.put('paths_recordedprefix', os.pathsep.join(['a', 'b', 'c'])) log.debug("Recording prefix = %s" % settings.get('paths_recordedprefix')) dirs = settings.getRecordingDirs() self.assertEquals(3, len(dirs)) self.assertEquals(['a', 'b', 'c'], dirs)