Skip to content

Commit 6eeb48a

Browse files
authored
feat: Add business_status (googlemaps#356)
1 parent 4609fce commit 6eeb48a

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

‎googlemaps/places.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
PLACES_FIND_FIELDS_BASIC = set(
2525
[
26+
"business_status",
2627
"formatted_address",
2728
"geometry",
2829
"geometry/location",
@@ -59,6 +60,7 @@
5960
[
6061
"address_component",
6162
"adr_address",
63+
"business_status",
6264
"formatted_address",
6365
"geometry",
6466
"geometry/location",

‎googlemaps/test/test_places.py‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ def test_places_find(self):
4747
status=200, content_type='application/json')
4848

4949
self.client.find_place('restaurant', 'textquery',
50-
fields=['geometry/location', 'place_id'],
50+
fields=['business_status', 'geometry/location', 'place_id'],
5151
location_bias='point:90,90',
5252
language=self.language)
5353

5454
self.assertEqual(1, len(responses.calls))
5555
self.assertURLEqual('%s?language=en-AU&inputtype=textquery&'
5656
'locationbias=point:90,90&input=restaurant'
57-
'&fields=geometry/location,place_id&key=%s'
57+
'&fields=business_status,geometry/location,place_id&key=%s'
5858
% (url, self.key), responses.calls[0].request.url)
5959

6060
with self.assertRaises(ValueError):
@@ -119,11 +119,12 @@ def test_place_detail(self):
119119
status=200, content_type='application/json')
120120

121121
self.client.place('ChIJN1t_tDeuEmsRUsoyG83frY4',
122-
fields=['geometry/location', 'place_id'], language=self.language)
122+
fields=['business_status', 'geometry/location', 'place_id'],
123+
language=self.language)
123124

124125
self.assertEqual(1, len(responses.calls))
125126
self.assertURLEqual('%s?language=en-AU&placeid=ChIJN1t_tDeuEmsRUsoyG83frY4'
126-
'&key=%s&fields=geometry/location,place_id'
127+
'&key=%s&fields=business_status,geometry/location,place_id'
127128
% (url, self.key), responses.calls[0].request.url)
128129

129130
with self.assertRaises(ValueError):

0 commit comments

Comments
 (0)