2020class DaftTest (unittest .TestCase ):
2121 @patch ("requests.post" )
2222 def test_search_basic (self , mock_post ):
23- url = "https://gateway.daft.ie/old/v1 /listings"
23+ url = "https://gateway.daft.ie/api/v2/ads /listings"
2424 payload = {
2525 "paging" : {"from" : "0" , "pagesize" : "50" },
2626 }
@@ -37,7 +37,7 @@ def test_search_basic(self, mock_post):
3737
3838 @patch ("requests.post" )
3939 def test_search_properties_for_sale (self , mock_post ):
40- url = "https://gateway.daft.ie/old/v1 /listings"
40+ url = "https://gateway.daft.ie/api/v2/ads /listings"
4141 payload = {
4242 "section" : "residential-for-sale" ,
4343 "andFilters" : [
@@ -94,7 +94,7 @@ def test_search_properties_for_sale(self, mock_post):
9494
9595 @patch ("requests.post" )
9696 def test_search_properties_for_rent (self , mock_post ):
97- url = "https://gateway.daft.ie/old/v1 /listings"
97+ url = "https://gateway.daft.ie/api/v2/ads /listings"
9898 payload = {
9999 "section" : "residential-to-rent" ,
100100 "andFilters" : [
@@ -145,7 +145,7 @@ def test_search_properties_for_rent(self, mock_post):
145145
146146 @patch ("requests.post" )
147147 def test_search_multiple_areas (self , mock_post ):
148- url = "https://gateway.daft.ie/old/v1 /listings"
148+ url = "https://gateway.daft.ie/api/v2/ads /listings"
149149 payload = {
150150 "section" : "residential-to-rent" ,
151151 "geoFilter" : {
@@ -173,7 +173,7 @@ def test_search_multiple_areas(self, mock_post):
173173
174174 @patch ("requests.post" )
175175 def test_shared_listings (self , mock_post ):
176- url = "https://gateway.daft.ie/old/v1 /listings"
176+ url = "https://gateway.daft.ie/api/v2/ads /listings"
177177 payload = {
178178 "section" : "sharing" ,
179179 "filters" : [
0 commit comments