replacing assertEquals into assertEqual
[nepi.git] / test / util / manifoldapi.py
index e8a6ddc..95053be 100755 (executable)
@@ -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):
         """