Skip to content

Commit

Permalink
feat: Add business_status (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
arriolac committed Apr 27, 2020
1 parent 4609fce commit 6eeb48a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions googlemaps/places.py
Expand Up @@ -23,6 +23,7 @@

PLACES_FIND_FIELDS_BASIC = set(
[
"business_status",
"formatted_address",
"geometry",
"geometry/location",
Expand Down Expand Up @@ -59,6 +60,7 @@
[
"address_component",
"adr_address",
"business_status",
"formatted_address",
"geometry",
"geometry/location",
Expand Down
9 changes: 5 additions & 4 deletions googlemaps/test/test_places.py
Expand Up @@ -47,14 +47,14 @@ def test_places_find(self):
status=200, content_type='application/json')

self.client.find_place('restaurant', 'textquery',
fields=['geometry/location', 'place_id'],
fields=['business_status', 'geometry/location', 'place_id'],
location_bias='point:90,90',
language=self.language)

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

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

self.client.place('ChIJN1t_tDeuEmsRUsoyG83frY4',
fields=['geometry/location', 'place_id'], language=self.language)
fields=['business_status', 'geometry/location', 'place_id'],
language=self.language)

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

with self.assertRaises(ValueError):
Expand Down

0 comments on commit 6eeb48a

Please sign in to comment.