예제 #1
0
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'
예제 #2
0
 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")
예제 #3
0
def getBySpec2(title1, spec1, spec2):
    api = apiLogic()
    countryInfo = api.gettingInfo(title1)
    return api.spec2(countryInfo, spec1, spec2)