]> granicus.if.org Git - pdns/commitdiff
Update tests
authorAki Tuomi <cmouse@desteem.org>
Sat, 1 Aug 2015 05:11:08 +0000 (08:11 +0300)
committerAki Tuomi <cmouse@cmouse.fi>
Tue, 4 Aug 2015 12:26:16 +0000 (15:26 +0300)
regression-tests.api/test_Zones.py

index 75f306a0ddbb436179cbb652d96e19ecc45f5be2..26f62e421fc03306c1d2dddec41a97f0e6a39fe8 100644 (file)
@@ -985,25 +985,25 @@ fred   IN  A      192.168.0.4
         r = self.session.get(self.url("/servers/localhost/search-data?q=" + name))
         self.assert_success_json(r)
         print r.json()
-        self.assertEquals(r.json(), [{u'type': u'zone', u'name': name, u'zone_id': name+'.'}])
+        self.assertEquals(r.json(), [{u'object_type': u'zone', u'name': name, u'zone_id': name+'.'}])
 
     def test_search_rr_substring(self):
         name = 'search-rr-zone.name'
         self.create_zone(name=name)
-        r = self.session.get(self.url("/servers/localhost/search-data?q=rr-zone"))
+        r = self.session.get(self.url("/servers/localhost/search-data?q=*rr-zone*"))
         self.assert_success_json(r)
         print r.json()
         # should return zone, SOA, ns1, ns2
-        self.assertEquals(len(r.json()), 1)  # FIXME test disarmed for now (should be 4)
+        self.assertEquals(len(r.json()), 4)
 
     def test_search_rr_case_insensitive(self):
         name = 'search-rr-insenszone.name'
         self.create_zone(name=name)
-        r = self.session.get(self.url("/servers/localhost/search-data?q=rr-insensZONE"))
+        r = self.session.get(self.url("/servers/localhost/search-data?q=*rr-insensZONE*"))
         self.assert_success_json(r)
         print r.json()
         # should return zone, SOA, ns1, ns2
-        self.assertEquals(len(r.json()), 1)  # FIXME test disarmed for now (should be 4)
+        self.assertEquals(len(r.json()), 4)
 
 
 @unittest.skipIf(not is_auth(), "Not applicable")