def test_filter_empty_02(self): from updatenotifier.updatecontroller import UpdateController plugin = self.loader['UpdateNotifier'] controller = UpdateController(self.application, plugin) currentVersionsDict = {'test_01': '0.1'} latestVersionsDict = {} result = controller.filterUpdatedApps(currentVersionsDict, latestVersionsDict) self.assertEqual(result, {})
def test_filter_empty_01(self): from updatenotifier.updatecontroller import UpdateController pluginPath = self.loader[u'UpdateNotifier'].pluginPath controller = UpdateController(Application, pluginPath) currentVersionsDict = {} latestVersionsDict = {} result = controller.filterUpdatedApps(currentVersionsDict, latestVersionsDict) self.assertEqual(result, {})
def test_filter_empty_05(self): from updatenotifier.updatecontroller import UpdateController plugin = self.loader['UpdateNotifier'] controller = UpdateController(self.application, plugin) latestVersion = Version(1, 0) latestVersionInfo = VersionInfo(latestVersion) currentVersionsDict = {'test_02': '1.0'} latestVersionsDict = { 'test_01': AppInfo('test', None, versionsList=[latestVersionInfo]), } result = controller.filterUpdatedApps(currentVersionsDict, latestVersionsDict) self.assertEqual(result, {})
def test_filter_empty_04(self): from updatenotifier.updatecontroller import UpdateController pluginPath = self.loader[u'UpdateNotifier'].pluginPath controller = UpdateController(Application, pluginPath) latestVersion = Version(1, 0) latestVersionInfo = VersionInfo(latestVersion) currentVersionsDict = {} latestVersionsDict = { u'test_01': AppInfo(u'test', None, versionsList=[latestVersionInfo]), } result = controller.filterUpdatedApps(currentVersionsDict, latestVersionsDict) self.assertEqual(result, {})
def test_filter_09(self): from updatenotifier.updatecontroller import UpdateController pluginPath = self.loader[u'UpdateNotifier'].pluginPath controller = UpdateController(Application, pluginPath) latestVersion = Version(1, 1) latestVersionInfo = VersionInfo(latestVersion) currentVersionsDict = {u'test_01': u'1.0', u'test_02': u'2.0', } latestVersionsDict = { u'test_01': AppInfo(u'test', None, versionsList=[latestVersionInfo]), } result = controller.filterUpdatedApps(currentVersionsDict, latestVersionsDict) self.assertEqual(len(result), 1) self.assertEqual(result[u'test_01'].appname, u'test')