'Test for successfully setting up the SleepIQ platform.'

@requests_mock.Mocker()
def test_setup(self, mock):

    mock_responses(mock)
    assert setup_component(self.hass, 'sleepiq', {'sleepiq': {'username': '', 'password': ''}})
    sleepiq.setup_platform(self.hass, self.config, self.add_devices, MagicMock())
    self.assertEqual(2, len(self.DEVICES))
    left_side = self.DEVICES[1]
    self.assertEqual('SleepNumber    ILE    Test1    SleepNumber', left_side.name)
    self.assertEqual(40, left_side.state)
    right_side = self.DEVICES[0]
    self.assertEqual('SleepNumber    ILE    Test2    SleepNumber', right_side.name)
    self.assertEqual(80, right_side.state)
