def users_xml_view(user_id):
    """
    Returns mean presence time of given user grouped by weekday.
    """
    data = users_xmldata()
    data = dict(data)
    if (str(user_id)) not in data:
        log.debug('User %s not found!', user_id)
        abort(404)

    return data[str(user_id)]
def users_xml_view(user_id):
    """
    Returns mean presence time of given user grouped by weekday.
    """
    data = users_xmldata()
    data = dict(data)
    if (str(user_id)) not in data:
        log.debug('User %s not found!', user_id)
        abort(404)

    return data[str(user_id)]
 def test_users_xmldata(self):
     """
     Test parsing of XML file.
     """
     data = utils.users_xmldata()
     self.assertIsInstance(data, dict)
     self.assertItemsEqual(
         data['10'].keys(), [
             'user_name',
             'link_to_avatar'
         ]
     )
     self.assertEqual(
         data['10']['user_name'],
         'Maciej Z.'
     )
     self.assertEqual(
         data['153']['link_to_avatar'],
         'https://intranet.stxnext.pl:443/api/images/users/153'
     )
def users_xml():
    """
    Users listing from XML file.
    """
    data = users_xmldata()
    return data
def users_xml():
    """
    Users listing from XML file.
    """
    data = users_xmldata()
    return data