def getAll(title1=None): api_funob = apiLogic() countryinfo = api_funob.gettingInfo(title1) if countryinfo is not None: return str(countryinfo) else: return 'ERROR NOT FOUUUUUND'
def test_spec1(self): va = [{'name': 'egypt', 'area': 1002450.0, 'population': 91290000}] spec = apiLogic() out = spec.spec1(va, "area") self.assertEqual(out, "area=1002450.0")
def getBySpec2(title1, spec1, spec2): api = apiLogic() countryInfo = api.gettingInfo(title1) return api.spec2(countryInfo, spec1, spec2)