'Setup component.'

def test_setup_component_test_entities(self, aioclient_mock):

    aioclient_mock.get(self.endpoint_url.format('persongroups'), text=load_fixture('microsoft_face_persongroups.json'))
    aioclient_mock.get(self.endpoint_url.format('persongroups/test_group1/persons'), text=load_fixture('microsoft_face_persons.json'))
    aioclient_mock.get(self.endpoint_url.format('persongroups/test_group2/persons'), text=load_fixture('microsoft_face_persons.json'))
    with assert_setup_component(3, mf.DOMAIN):
        setup_component(self.hass, mf.DOMAIN, self.config)
    assert (len(aioclient_mock.mock_calls) == 3)
    entity_group1 = self.hass.states.get('microsoft_face.test_group1')
    entity_group2 = self.hass.states.get('microsoft_face.test_group2')
    assert (entity_group1 is not None)
    assert (entity_group2 is not None)
    assert (entity_group1.attributes['Ryan'] == '25985303-c537-4467-b41d-bdb45cd95ca1')
    assert (entity_group1.attributes['David'] == '2ae4935b-9659-44c3-977f-61fac20d0538')
    assert (entity_group2.attributes['Ryan'] == '25985303-c537-4467-b41d-bdb45cd95ca1')
    assert (entity_group2.attributes['David'] == '2ae4935b-9659-44c3-977f-61fac20d0538')
