[LNT] r306742 - Typo in method name

Chris Matthews via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 29 14:33:00 PDT 2017


Author: cmatthews
Date: Thu Jun 29 14:33:00 2017
New Revision: 306742

URL: http://llvm.org/viewvc/llvm-project?rev=306742&view=rev
Log:
Typo in method name

Modified:
    lnt/trunk/tests/server/ui/test_api.py

Modified: lnt/trunk/tests/server/ui/test_api.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/server/ui/test_api.py?rev=306742&r1=306741&r2=306742&view=diff
==============================================================================
--- lnt/trunk/tests/server/ui/test_api.py (original)
+++ lnt/trunk/tests/server/ui/test_api.py Thu Jun 29 14:33:00 2017
@@ -113,7 +113,7 @@ class JSONAPITester(unittest.TestCase):
         app.testing = True
         self.client = app.test_client()
 
-    def _check_response_is_wellformed(self, response):
+    def _check_response_is_well_formed(self, response):
         """API Should always return the generated by field in the top level dict."""
         # All API calls should return a top level dict.
         self.assertEqual(type(response), dict)
@@ -131,13 +131,13 @@ class JSONAPITester(unittest.TestCase):
 
         # All machines returns the list of machines with parameters, but no runs.
         j = check_json(client, 'api/db_default/v4/nts/machines/')
-        self._check_response_is_wellformed(j)
+        self._check_response_is_well_formed(j)
         self.assertEquals(j['machines'], machines_expected_response)
         self.assertIsNone(j.get('runs'))
 
         # Machine + properties + run information.
         j = check_json(client, 'api/db_default/v4/nts/machines/1')
-        self._check_response_is_wellformed(j)
+        self._check_response_is_well_formed(j)
         self.assertEqual(len(j['machines']), 1)
         for machine in j['machines']:
             self.assertSetEqual(set(machine.keys()), possible_machine_keys)
@@ -155,7 +155,7 @@ class JSONAPITester(unittest.TestCase):
         """Check /runs/n returns expected run information."""
         client = self.client
         j = check_json(client, 'api/db_default/v4/nts/runs/1')
-        self._check_response_is_wellformed(j)
+        self._check_response_is_well_formed(j)
         expected = {"end_time": "2012-04-11T16:28:58",
                     "order_id": 1,
                     "start_time": "2012-04-11T16:28:23",
@@ -171,8 +171,8 @@ class JSONAPITester(unittest.TestCase):
         """ Check /orders/n returns the expected order information."""
         client = self.client
         j = check_json(client, 'api/db_default/v4/nts/orders/1')
-        self._check_response_is_wellformed(j)
         self.assertEquals(j['orders'][0], order_expected_response)
+        self._check_response_is_well_formed(j)
         check_json(client, 'api/db_default/v4/nts/orders/100', expected_code=404)
 
     def test_graph_api(self):
@@ -181,12 +181,12 @@ class JSONAPITester(unittest.TestCase):
 
         j = check_json(client, 'api/db_default/v4/nts/graph/2/4/3')
         # TODO: Graph API needs redesign to be well formed.
-        # self._check_response_is_wellformed(j)
+        # self._check_response_is_well_formed(j)
         self.assertEqual(graph_data, j)
 
         # Now check that limit works.
         j2 = check_json(client, 'api/db_default/v4/nts/graph/2/4/3?limit=1')
-        # self._check_response_is_wellformed(j)
+        # self._check_response_is_well_formed(j)
         self.assertEqual(graph_data2, j2)
 
     def test_samples_api(self):
@@ -198,7 +198,7 @@ class JSONAPITester(unittest.TestCase):
 
         # Simple single run.
         j = check_json(client, 'api/db_default/v4/nts/samples?runid=1')
-        self._check_response_is_wellformed(j)
+        self._check_response_is_well_formed(j)
         expected = [
             {u'compile_time': 0.007, u'llvm_project_revision': u'154331',
              u'hash': None,
@@ -221,12 +221,12 @@ class JSONAPITester(unittest.TestCase):
         # Check that other args are ignored.
         extra_param = check_json(client,
                                  'api/db_default/v4/nts/samples?runid=1&foo=bar')
-        self._check_response_is_wellformed(extra_param)
+        self._check_response_is_well_formed(extra_param)
         self.assertEqual(j, extra_param)
         # There is only one run in the DB.
         two_runs = check_json(client,
                               'api/db_default/v4/nts/samples?runid=1&runid=2')
-        self._check_response_is_wellformed(two_runs)
+        self._check_response_is_well_formed(two_runs)
         self.assertEqual(j, two_runs)
 
 




More information about the llvm-commits mailing list