async def test_oscillate(hass):
    'Test oscillating the fan.'
    assert (not get_entity(hass).attributes.get('oscillating'))
    (await common.async_oscillate(hass, FAN_ENTITY_ID, True))
    assert get_entity(hass).attributes.get('oscillating')
    (await common.async_oscillate(hass, FAN_ENTITY_ID, False))
    assert (not get_entity(hass).attributes.get('oscillating'))
Test oscillating the fan.
async def test_oscillate(hass):
    
    assert (not get_entity(hass).attributes.get('oscillating'))
    (await common.async_oscillate(hass, FAN_ENTITY_ID, True))
    assert get_entity(hass).attributes.get('oscillating')
    (await common.async_oscillate(hass, FAN_ENTITY_ID, False))
    assert (not get_entity(hass).attributes.get('oscillating'))