pushlog: port test with changeset and id boundaries; r=edmorley
authorGregory Szorc <gps@mozilla.com>
Tue, 25 Nov 2014 12:10:49 -0800
changeset 359992 cce54a4ac2b96b491a18fa043af3dc910c49813a
parent 359991 1e7a77c3afb3914be49045cc9a9fe4958d3633be
child 359993 402c7da0ccae43f58a298a71e1f1be55385412a4
push id16998
push userrwood@mozilla.com
push dateMon, 02 May 2016 19:42:03 +0000
reviewersedmorley
pushlog: port test with changeset and id boundaries; r=edmorley
hgext/pushlog-legacy/tests/test-hgweb.t
hgext/pushlog-legacy/tests/test-pushlog.py
--- a/hgext/pushlog-legacy/tests/test-hgweb.t
+++ b/hgext/pushlog-legacy/tests/test-hgweb.t
@@ -29,8 +29,24 @@ Get all JSON data
 
 Get all JSON data with details
 
   $ http "http://localhost:$HGPORT/json-pushes?startID=0&full=1" --header content-type --body-file body
   200
   content-type: application/json
 
   $ jsoncompare body $TESTDATA/test-repo-data-full.json
+
+Query with fromchange and an endID
+
+  $ http "http://localhost:$HGPORT/json-pushes?fromchange=cc07cc0e87f8&endID=15" --header content-type --body-file body
+  200
+  content-type: application/json
+
+  $ jsoncompare body $TESTDATA/test-repo-fromchange-endid-query.json
+
+Query with a startID and tochange
+
+  $ http "http://localhost:$HGPORT/json-pushes?startID=5&tochange=af5fb85d9324" --header content-type --body-file body
+  200
+  content-type: application/json
+
+  $ jsoncompare body $TESTDATA/test-repo-startid-tochange-query.json
--- a/hgext/pushlog-legacy/tests/test-pushlog.py
+++ b/hgext/pushlog-legacy/tests/test-pushlog.py
@@ -200,22 +200,16 @@ class TestPushlog(HGWebTest, unittest.Te
         self.assertEqual(testjson, expectedjson, "json-pushes did not yield expected json data!")
 
     def teststartdatetoendidquery(self):
         """Query with a startdate and an endID."""
         testjson = self.loadjsonurl("/json-pushes?startdate=2008-11-20%2010:52:25&endID=15")
         expectedjson = loadjsonfile("testdata/test-repo-startdate-endid-query.json")
         self.assertEqual(testjson, expectedjson, "json-pushes did not yield expected json data!")
 
-    def testfromchangetoendidquery(self):
-        """Query with fromchange and an endID."""
-        testjson = self.loadjsonurl("/json-pushes?fromchange=cc07cc0e87f8&endID=15")
-        expectedjson = loadjsonfile("testdata/test-repo-fromchange-endid-query.json")
-        self.assertEqual(testjson, expectedjson, "json-pushes did not yield expected json data!")
-
     def teststartidtochangequery(self):
         """Query with a startID and tochange."""
         testjson = self.loadjsonurl("/json-pushes?startID=5&tochange=af5fb85d9324")
         expectedjson = loadjsonfile("testdata/test-repo-startid-tochange-query.json")
         self.assertEqual(testjson, expectedjson, "json-pushes did not yield expected json data!")
 
     def testfromchangetoenddatequery(self):
         """Query with fromchange and an enddate."""