'Test serializer return data properly when user does not have profile.'

def test_user_no_profile(self):

    with LogCapture(LOGGER_NAME, level=logging.DEBUG) as logger:
        data = UserReadOnlySerializer(self.user, configuration=self.config, context={'request': self.request}).data
        logger.check((LOGGER_NAME, 'WARNING', 'user    profile    for    the    user    [test_user]    does    not    exist'))
    self.assertEqual(data['username'], self.user.username)
    self.assertEqual(data['name'], None)
