def test_softwareByUverNameError(self): """Should raise an exception when software was not found (uver).""" softwares = self.__getSoftwares() query = Query(softwares) success = False try: query.softwareByUverName('UVER_E_VERSION') except SoftwareNotFoundError: success = True self.assertTrue(success)
def test_softwareByUverName(self): """Should return a software instance by uver name.""" softwares = self.__getSoftwares() query = Query(softwares) for index, software in enumerate(softwares): self.assertEqual(query.softwareByUverName(software.uverName()), softwares[index])