def is_state(api, entity_id, state):
    cur_state = get_state(api, entity_id)

    return cur_state and cur_state.state == state
Check that POST requests are denied.
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/remote.py/is_state--crossover with--dataset/ETHPy150Open skibblenybbles/django-daydreamer/daydreamer/tests/views/behaviors/http/tests.py/RequireSafeTestCase.test_post_denied