'Test media_pause.'

def test_playing_pausing(self):

    assert setup_component(self.hass, mp.DOMAIN, {'media_player': {'platform': 'demo'}})
    assert self.hass.states.is_state(entity_id, 'playing')
    mp.media_pause(self.hass, entity_id)
    self.hass.block_till_done()
    assert self.hass.states.is_state(entity_id, 'paused')
    mp.media_play_pause(self.hass, entity_id)
    self.hass.block_till_done()
    assert self.hass.states.is_state(entity_id, 'playing')
    mp.media_play_pause(self.hass, entity_id)
    self.hass.block_till_done()
    assert self.hass.states.is_state(entity_id, 'paused')
    mp.media_play(self.hass, entity_id)
    self.hass.block_till_done()
    assert self.hass.states.is_state(entity_id, 'playing')
