diff --git a/.coveragerc b/.coveragerc index b8e1bbf05c4..b2f1507061c 100644 --- a/.coveragerc +++ b/.coveragerc @@ -24,8 +24,6 @@ omit = homeassistant/components/envisalink.py homeassistant/components/*/envisalink.py - homeassistant/components/foursquare.py - homeassistant/components/insteon_hub.py homeassistant/components/*/insteon_hub.py @@ -128,6 +126,7 @@ omit = homeassistant/components/garage_door/wink.py homeassistant/components/garage_door/rpi_gpio.py homeassistant/components/hdmi_cec.py + homeassistant/components/foursquare.py homeassistant/components/ifttt.py homeassistant/components/joaoapps_join.py homeassistant/components/keyboard.py diff --git a/homeassistant/components/foursquare.py b/homeassistant/components/foursquare.py index 34845415205..57fa441774c 100644 --- a/homeassistant/components/foursquare.py +++ b/homeassistant/components/foursquare.py @@ -76,7 +76,7 @@ class FoursquarePushReceiver(HomeAssistantView): """Handle pushes from the Foursquare API.""" requires_auth = False - url = "/foursquare" + url = "/api/foursquare" name = "foursquare" def __init__(self, hass, push_secret): @@ -92,9 +92,8 @@ class FoursquarePushReceiver(HomeAssistantView): _LOGGER.error("Received Foursquare push with invalid" "push secret! Data: %s", raw_data) return - parsed_payload = {} - for key, val in raw_data.items(): - if key == "secret": - continue - parsed_payload[key] = json.loads(val) + parsed_payload = { + key: json.loads(val) for key, val in raw_data.items() + if key != "secret" + } self.hass.bus.fire(EVENT_PUSH, parsed_payload)