Ejemplo n.º 1
0
 def _generate_calendar_item(self, props):
     return T.CalendarItem(
         props['id'].to_xml(), T.Subject(props['subject']),
         T.HasAttachments('false'), T.IsAssociated('false'),
         T.Start(format_date_for_xml(props['start'])),
         T.End(format_date_for_xml(props['end'])),
         T.LegacyFreeBusyStatus('Busy'), T.Location(""),
         T.CalendarItemType('Single'),
         T.Organizer(
             T.Mailbox(T.Name(props['organizer_name']),
                       T.EmailAddress('/O=Dummy'), T.RoutingType('EX'),
                       T.MailboxType('OneOff'))))
Ejemplo n.º 2
0
 def handle_resolve_names(self, request):
     if not request.xpath("//m:ResolveNames", namespaces=NAMESPACES):
         return  # pragma: no cover
     ldap_address = request.xpath("//m:UnresolvedEntry",
                                  namespaces=NAMESPACES)[0].text
     assert ldap_address == '/O=Dummy'
     return M.ResolveNamesResponse(
         M.ResponseMessages(
             M.ResolveNamesResponseMessage(
                 {'ResponseClass': 'Success'}, M.ResponseCode('NoError'),
                 M.ResolutionSet(
                     {
                         'TotalItemsInView': '1',
                         'IncludesLastItemInRange': 'true',
                     },
                     T.Resolution(
                         T.Mailbox(T.EmailAddress('*****@*****.**'),
                                   T.RoutingType('SMTP'),
                                   T.MailboxType('Mailbox')),
                         T.Contact(
                             T.DisplayName('Dummy Bob'),
                             T.GivenName('Bob'),
                             T.Surname('Dummy'),
                         ))))))