X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=test%2Futil%2Fmanifoldapi.py;h=95053be8f1ff4d49f7693bae7d79e9dcdbb37999;hb=1d2350d56f314a6e3de43517a66f7e2f48128d44;hp=e8a6ddcd0edf65206a60ec9ba05c5e7b0a620711;hpb=a603d9ef42f4a866f4aebea4260fa4deb995477b;p=nepi.git diff --git a/test/util/manifoldapi.py b/test/util/manifoldapi.py index e8a6ddcd..95053be8 100755 --- a/test/util/manifoldapi.py +++ b/test/util/manifoldapi.py @@ -4,9 +4,8 @@ # Copyright (C) 2013 INRIA # # This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation; # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -44,7 +43,7 @@ class MFAPIFactoryTestCase(unittest.TestCase): self.assertIsInstance(api1, MANIFOLDAPI) self.assertIsInstance(api2, MANIFOLDAPI) - self.assertEquals(api1, api2) + self.assertEqual(api1, api2) class MANIFOLDAPITestCase(unittest.TestCase): @@ -66,33 +65,33 @@ class MANIFOLDAPITestCase(unittest.TestCase): r_info = self.api.get_resource_info(filters=filters) hostname = r_info[0]['hostname'] - self.assertEquals(hostname, 'planetlab2.tlm.unavarra.es') + self.assertEqual(hostname, 'planetlab2.tlm.unavarra.es') # query with 2 filters filters['network'] = 'ple' r_info = self.api.get_resource_info(filters=filters) hostname = r_info[0]['hostname'] - self.assertEquals(hostname, 'planetlab2.tlm.unavarra.es') + self.assertEqual(hostname, 'planetlab2.tlm.unavarra.es') # query with fields only, without filters fields = ['latitude','longitude'] r_info = self.api.get_resource_info(fields=fields) value = r_info[10] - self.assertEquals(value.keys(), fields) + self.assertEqual(value.keys(), fields) # query with 2 filters and 2 fields r_info = self.api.get_resource_info(filters, fields) value = r_info[0] result = {'latitude': '42.7993', 'longitude': '-1.63544'} - self.assertEquals(value, result) + self.assertEqual(value, result) # query with filters where the AND should be zero resources filters['network'] = 'omf' r_info = self.api.get_resource_info(filters, fields) - self.assertEquals(r_info, []) + self.assertEqual(r_info, []) def test_fail_if_invalid_field(self): """ @@ -119,7 +118,7 @@ class MANIFOLDAPITestCase(unittest.TestCase): 'urn:publicid:IDN+ple:uttple+node+planetlab2.utt.fr', 'urn:publicid:IDN+ple:lilleple+node+node1pl.planet-lab.telecom-lille1.eu'] - self.assertEquals(resources, result) + self.assertEqual(resources, result) def test_update_resources_from_slice(self): """