Module ImportFrom alias ImportFrom alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str Assign NameStore Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr CompareGt AttributeLoad NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore BinOpAdd Call NameLoad Call NameLoad keyword Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Call NameLoad With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Call NameLoad With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad Expr Call NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call NameLoad Expr Call NameLoad With Call NameLoad Str NameStore body Assign AttributeStore AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call NameLoad Expr Call NameLoad With Call NameLoad Str NameStore body Assign AttributeStore AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list Call NameLoad keyword Num decorator_list Call NameLoad keyword NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad With Call NameLoad Str NameStore body Assign AttributeStore AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad With Call NameLoad Str NameStore body Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad With Call NameLoad Str NameStore body Assign AttributeStore AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call NameLoad Str NameStore body Assign AttributeStore AttributeLoad NameLoad attr attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call NameLoad Str NameStore body Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call NameLoad Str NameStore body Assign AttributeStore AttributeLoad NameLoad attr attr Num TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call NameLoad Str NameStore body Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call NameLoad Str NameStore body Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call NameLoad Str NameStore body Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call NameLoad Str NameStore body Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad keyword NameLoad Expr Call NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad keyword BinOpSub Call NameLoad Call NameLoad keyword Num keyword NameLoad Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad Expr Call NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list decorator_list
N/A datetime timedelta mock patch N/A re django.core management django.test TestCase django.test.utils override_settings django.utils.timezone now N/A requests factories ConsumedProxyGrantingTicketFactory factories ConsumedProxyTicketFactory factories ConsumedServiceTicketFactory factories ExpiredProxyGrantingTicketFactory factories ExpiredServiceTicketFactory factories ProxyGrantingTicketFactory factories ProxyTicketFactory factories ServiceTicketFactory factories UserFactory mama_cas.models ProxyGrantingTicket mama_cas.models ProxyTicket mama_cas.models ServiceTicket mama_cas.exceptions InvalidProxyCallback mama_cas.exceptions InvalidRequest mama_cas.exceptions InvalidService mama_cas.exceptions InvalidTicket mama_cas.exceptions UnauthorizedServiceProxy TicketManagerTests N/A TestCase N/A N/A 
    Test the ``TicketManager`` model manager.
     N/A url http://www.example.com/ setUp N/A N/A self N/A N/A N/A N/A self user N/A UserFactory N/A test_create_ticket N/A N/A self N/A N/A N/A 
        A ticket ought to be created with a generated ticket string.
         N/A st N/A N/A N/A ServiceTicket objects create_ticket user N/A self user N/A N/A N/A self assertTrue N/A N/A re search N/A st TICKET_RE N/A st ticket N/A test_create_ticket_ticket N/A N/A self N/A N/A N/A 
        A ticket ought to be created with a provided ticket string,
        if present.
         N/A ticket ST-0000000000-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa N/A st N/A N/A N/A ServiceTicket objects create_ticket ticket ticket user N/A self user N/A N/A N/A self assertEqual N/A st ticket ticket N/A test_create_ticket_service N/A N/A self N/A N/A N/A 
        If a service is provided, it should be cleaned.
         N/A service http://www.example.com/test?test3=blue#green N/A st N/A N/A N/A ServiceTicket objects create_ticket service service user N/A self user N/A N/A N/A self assertEqual N/A st service http://www.example.com/test N/A test_create_ticket_no_expires N/A N/A self N/A N/A N/A 
        A ticket ought to be created with a calculated expiry value.
         N/A st N/A N/A N/A ServiceTicket objects create_ticket user N/A self user N/A N/A N/A self assertTrue N/A N/A st expires N/A now N/A test_create_ticket_expires N/A N/A self N/A N/A N/A 
        A ticket ought to be created with a provided expiry value,
        if present.
         N/A expires N/A N/A now N/A timedelta seconds 30 N/A st N/A N/A N/A ServiceTicket objects create_ticket expires expires user N/A self user N/A N/A N/A self assertEqual N/A st expires expires N/A test_create_ticket_str N/A N/A self N/A N/A N/A 
        A ticket string should be created with the appropriate model
        prefix and format.
         N/A str N/A N/A N/A ServiceTicket objects create_ticket_str N/A N/A N/A self assertTrue N/A N/A re search ^ST-[0-9]{10,}-[a-zA-Z0-9]{32}$ str N/A test_create_ticket_str_prefix N/A N/A self N/A N/A N/A 
        A ticket string should be created with the provided prefix
        string and format.
         N/A str N/A N/A N/A ProxyGrantingTicket objects create_ticket_str prefix PGTIOU N/A N/A N/A self assertTrue N/A N/A re search ^PGTIOU-[0-9]{10,}-[a-zA-Z0-9]{32}$ str N/A test_validate_ticket N/A N/A self N/A N/A N/A 
        Validation ought to succeed when provided with a valid ticket
        string and data. The ticket ought to be consumed in the process.
         N/A st N/A ServiceTicketFactory N/A ticket N/A N/A N/A ServiceTicket objects validate_ticket N/A st ticket N/A self url N/A N/A N/A self assertEqual ticket st N/A N/A N/A self assertTrue N/A N/A ticket is_consumed N/A test_validate_ticket_no_ticket N/A N/A self N/A N/A N/A 
        The validation process ought to fail when no ticket string is
        provided.
         N/A N/A N/A self assertRaises InvalidRequest N/A N/A N/A N/A N/A ServiceTicket objects validate_ticket None N/A self url N/A test_validate_ticket_invalid_ticket N/A N/A self N/A N/A N/A 
        The validation process ought to fail when an invalid ticket
        string is provided.
         N/A N/A N/A self assertRaises InvalidTicket N/A N/A N/A N/A N/A ServiceTicket objects validate_ticket 12345 N/A self url N/A test_validate_ticket_does_not_exist N/A N/A self N/A N/A N/A 
        The validation process ought to fail when a valid ticket string
        cannot be found in the database.
         N/A ticket ST-0000000000-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa N/A N/A N/A self assertRaises InvalidTicket N/A N/A N/A N/A N/A ServiceTicket objects validate_ticket ticket N/A self url N/A test_validate_ticket_consumed_ticket N/A N/A self N/A N/A N/A 
        The validation process ought to fail when a consumed ticket
        is provided.
         N/A st N/A ConsumedServiceTicketFactory N/A N/A N/A self assertRaises InvalidTicket N/A N/A N/A N/A N/A ServiceTicket objects validate_ticket N/A st ticket N/A self url N/A test_validate_ticket_expired_ticket N/A N/A self N/A N/A N/A 
        The validation process ought to fail when an expired ticket
        is provided.
         N/A st N/A ExpiredServiceTicketFactory N/A N/A N/A self assertRaises InvalidTicket N/A N/A N/A N/A N/A ServiceTicket objects validate_ticket N/A st ticket N/A self url N/A test_validate_ticket_no_service N/A N/A self N/A N/A N/A 
        The validation process ought to fail when no service identifier
        is provided. The ticket ought to be consumed in the process.
         N/A st N/A ServiceTicketFactory N/A N/A N/A self assertRaises InvalidRequest N/A N/A N/A N/A N/A ServiceTicket objects validate_ticket N/A st ticket None N/A st N/A N/A N/A ServiceTicket objects get ticket N/A st ticket N/A N/A N/A self assertTrue N/A N/A st is_consumed N/A test_validate_ticket_invalid_service N/A N/A self N/A N/A N/A 
        The validation process ought to fail when an invalid service
        identifier is provided.
         N/A service http://www.example.org N/A st N/A ServiceTicketFactory N/A N/A N/A self assertRaises InvalidService N/A N/A N/A N/A N/A ServiceTicket objects validate_ticket N/A st ticket service N/A test_validate_ticket_service_mismatch N/A N/A self N/A N/A N/A 
        The validation process ought to fail when the provided service
        identifier does not match the ticket's service.
         N/A service http://sub.example.com/ N/A st N/A ServiceTicketFactory N/A N/A N/A self assertRaises InvalidService N/A N/A N/A N/A N/A ServiceTicket objects validate_ticket N/A st ticket service N/A test_validate_ticket_renew N/A N/A self N/A N/A N/A 
        When ``renew`` is set, the validation process should succeed
        if the ticket was issued from the presentation of the user's
        primary credentials.
         N/A st N/A ServiceTicketFactory primary True N/A ticket N/A N/A N/A ServiceTicket objects validate_ticket N/A st ticket N/A self url renew True N/A N/A N/A self assertEqual ticket st N/A test_validate_ticket_renew_secondary N/A N/A self N/A N/A N/A 
        When ``renew`` is set, the validation process should fail if
        the ticket was not issued from the presentation of the user's
        primary credentials.
         N/A st N/A ServiceTicketFactory N/A N/A N/A self assertRaises InvalidTicket N/A N/A N/A N/A N/A ServiceTicket objects validate_ticket N/A st ticket N/A self url renew True N/A test_delete_invalid_tickets N/A N/A self N/A N/A N/A 
        Expired or consumed tickets should be deleted. Invalid tickets
        referenced by other tickets should not be deleted.
         N/A N/A ServiceTicketFactory N/A expired N/A ExpiredServiceTicketFactory N/A consumed N/A ConsumedServiceTicketFactory N/A referenced N/A ConsumedServiceTicketFactory N/A N/A ProxyGrantingTicketFactory granted_by_st referenced N/A N/A N/A N/A ServiceTicket objects delete_invalid_tickets N/A N/A N/A self assertEqual N/A N/A N/A ServiceTicket objects count 2 N/A N/A N/A self assertRaises N/A ServiceTicket DoesNotExist N/A N/A ServiceTicket objects get ticket N/A expired ticket N/A N/A N/A self assertRaises N/A ServiceTicket DoesNotExist N/A N/A ServiceTicket objects get ticket N/A consumed ticket N/A test_consume_tickets N/A N/A self N/A N/A N/A 
        All tickets belonging to the specified user should be consumed.
         N/A st1 N/A ServiceTicketFactory N/A st2 N/A ServiceTicketFactory N/A N/A N/A N/A ServiceTicket objects consume_tickets N/A self user N/A N/A N/A self assertTrue N/A N/A N/A N/A N/A ServiceTicket objects get ticket st1 is_consumed N/A N/A N/A self assertTrue N/A N/A N/A N/A N/A ServiceTicket objects get ticket st2 is_consumed N/A N/A TicketTests N/A TestCase N/A N/A 
    Test the ``Ticket`` abstract model.
     test_ticket_consumed N/A N/A self N/A N/A N/A 
        ``is_consumed()`` should return ``True`` for a consumed ticket.
         N/A st N/A ServiceTicketFactory N/A N/A N/A st consume N/A st N/A N/A N/A ServiceTicket objects get ticket N/A st ticket N/A N/A N/A self assertTrue N/A N/A st is_consumed N/A test_ticket_not_consumed N/A N/A self N/A N/A N/A 
        ``is_consumed()`` should return ``False`` for a valid ticket.
         N/A st N/A ServiceTicketFactory N/A N/A N/A self assertFalse N/A N/A st is_consumed N/A test_ticket_expired N/A N/A self N/A N/A N/A 
        ``is_expired()`` should return ``True`` for an expired ticket.
         N/A st N/A ExpiredServiceTicketFactory N/A N/A N/A self assertTrue N/A N/A st is_expired N/A test_ticket_not_expired N/A N/A self N/A N/A N/A 
        ``is_expired()`` should return ``False`` for a valid ticket.
         N/A st N/A ServiceTicketFactory N/A N/A N/A self assertFalse N/A N/A st is_expired N/A N/A ServiceTicketManagerTests N/A TestCase N/A N/A 
    Test the ``ServiceTicketManager`` model manager.
     setUp N/A N/A self N/A N/A N/A N/A self user N/A UserFactory N/A test_request_sign_out N/A N/A self N/A N/A N/A 
        Calling the ``request_sign_out()`` manager method should
        issue a POST request for each consumed ticket for the
        provided user.
         N/A N/A ConsumedServiceTicketFactory N/A N/A ConsumedServiceTicketFactory N/A N/A patch requests.post mock N/A N/A N/A N/A mock return_value status_code 200 N/A N/A N/A N/A ServiceTicket objects request_sign_out N/A self user N/A N/A N/A self assertEqual N/A mock call_count 2 N/A test_request_sign_out_no_pool N/A N/A self N/A N/A N/A 
        Calling the ``request_sign_out()`` manager method with
        concurrency disabled should issue a POST request for each
        consumed ticket for the provided user.
         N/A N/A ConsumedServiceTicketFactory N/A N/A ConsumedServiceTicketFactory N/A N/A patch requests.post mock N/A N/A N/A N/A mock return_value status_code 200 N/A N/A N/A N/A ServiceTicket objects request_sign_out N/A self user N/A N/A N/A self assertEqual N/A mock call_count 2 N/A N/A override_settings MAMA_CAS_ASYNC_CONCURRENCY 0 N/A N/A override_settings MAMA_CAS_ENABLE_SINGLE_SIGN_OUT True ServiceTicketTests N/A TestCase N/A N/A 
    Test the ``ServiceTicket`` model.
     test_create_service_ticket N/A N/A self N/A N/A N/A 
        A ``ServiceTicket`` ought to be created with an appropriate
        prefix.
         N/A st N/A ServiceTicketFactory N/A N/A N/A self assertTrue N/A N/A N/A st ticket startswith N/A st TICKET_PREFIX N/A test_primary N/A N/A self N/A N/A N/A 
        ``is_primary()`` should return ``True`` if the ``ServiceTicket``
        was created from the presentation of a user's credentials.
         N/A st N/A ServiceTicketFactory primary True N/A N/A N/A self assertTrue N/A N/A st is_primary N/A test_secondary N/A N/A self N/A N/A N/A 
        ``is_primary()`` should return ``False`` if the ``ServiceTicket``
        was not created from the presentation of a user's credentials.
         N/A st N/A ServiceTicketFactory N/A N/A N/A self assertFalse N/A N/A st is_primary N/A test_request_sign_out N/A N/A self N/A N/A N/A 
        A successful sign-out request to a service should not
        cause any side-effects.
         N/A st N/A ServiceTicketFactory N/A N/A patch requests.post mock N/A N/A N/A N/A mock return_value status_code 200 N/A N/A N/A st request_sign_out N/A test_request_sign_out_exception N/A N/A self N/A N/A N/A 
        If a sign-out request to a service raises an exception,
        it should be handled.
         N/A st N/A ServiceTicketFactory N/A N/A patch requests.post mock N/A N/A N/A mock side_effect N/A N/A requests exceptions RequestException N/A N/A N/A st request_sign_out N/A test_request_sign_out_invalid_status N/A N/A self N/A N/A N/A 
        If a sign-out request to a service returns an invalid
        status code, the resulting exception should be handled.
         N/A st N/A ServiceTicketFactory N/A N/A patch requests.post mock N/A N/A N/A N/A mock return_value status_code 500 N/A N/A N/A st request_sign_out N/A N/A ProxyTicketTests N/A TestCase N/A N/A 
    Test the ``ProxyTicket`` model.
     test_create_proxy_ticket N/A N/A self N/A N/A N/A 
        A ``ProxyTicket`` ought to be created with an appropriate
        prefix.
         N/A pt N/A ProxyTicketFactory N/A N/A N/A self assertTrue N/A N/A N/A pt ticket startswith N/A pt TICKET_PREFIX N/A N/A ProxyGrantingTicketManager N/A TestCase N/A N/A 
    Test the ``ProxyGrantingTicketManager`` model manager.
     setUp N/A N/A self N/A N/A N/A N/A self user N/A UserFactory N/A N/A self pt N/A ProxyTicketFactory N/A N/A self pgtid N/A N/A N/A ProxyGrantingTicket objects create_ticket_str N/A N/A self pgtiou N/A N/A N/A ProxyGrantingTicket objects create_ticket_str prefix N/A ProxyGrantingTicket IOU_PREFIX N/A test_create_ticket N/A N/A self N/A N/A N/A 
        A ``ProxyGrantingTicket`` ought to be created with the
        appropriate ticket strings.
         N/A N/A patch requests.get mock N/A N/A N/A N/A mock return_value status_code 200 N/A pgt N/A N/A N/A ProxyGrantingTicket objects create_ticket https://www.example.com https://www.example.com/ user N/A self user granted_by_pt N/A self pt N/A N/A N/A self assertTrue N/A N/A re search N/A pgt TICKET_RE N/A pgt ticket N/A N/A N/A self assertTrue N/A N/A N/A pgt iou startswith N/A pgt IOU_PREFIX N/A test_create_ticket_invalid_pgturl N/A N/A self N/A N/A N/A 
        If callback validation fails, ``None`` should be returned
        instead of a ``ProxyGrantingTicket``.
         N/A N/A patch requests.get mock N/A N/A N/A mock side_effect N/A N/A requests exceptions ConnectionError N/A pgt N/A N/A N/A ProxyGrantingTicket objects create_ticket https://www.example.com https://www.example.com/ user N/A self user granted_by_pt N/A self pt N/A N/A N/A self assertIsNone pgt N/A test_validate_callback N/A N/A self N/A N/A N/A 
        If a valid PGTURL is provided, an exception should not be raised.
         N/A N/A patch requests.get mock N/A N/A N/A N/A mock return_value status_code 200 N/A N/A N/A N/A N/A N/A ProxyGrantingTicket objects validate_callback https://www.example.com https://www.example.com/ N/A self pgtid N/A self pgtiou N/A N/A N/A InvalidProxyCallback N/A N/A N/A N/A self fail Exception raised validating proxy callback URL N/A test_validate_callback_unauthorized_service N/A N/A self N/A N/A N/A 
        If an unauthorized service is provided, `UnauthorizedServiceProxy`
        should be raised.
         N/A N/A N/A self assertRaises UnauthorizedServiceProxy N/A N/A N/A N/A N/A ProxyGrantingTicket objects validate_callback http://example.com/ https://www.example.com/ N/A self pgtid N/A self pgtiou N/A test_validate_callback_http_pgturl N/A N/A self N/A N/A N/A 
        If an HTTP PGTURL is provided, InvalidProxyCallback should be raised.
         N/A N/A N/A self assertRaises InvalidProxyCallback N/A N/A N/A N/A N/A ProxyGrantingTicket objects validate_callback http://www.example.com/ http://www.example.com/ N/A self pgtid N/A self pgtiou N/A test_validate_callback_invalid_pgturl N/A N/A self N/A N/A N/A If an invalid PGTURL is provided, InvalidProxyCallback should be raised. N/A N/A N/A self assertRaises InvalidProxyCallback N/A N/A N/A N/A N/A ProxyGrantingTicket objects validate_callback http://www.example.com/ https://www.example.org/ N/A self pgtid N/A self pgtiou N/A test_validate_callback_ssl_error N/A N/A self N/A N/A N/A 
        If the validation request encounters an SSL error, an
        InvalidProxyCallback should be raised.
         N/A N/A patch requests.get mock N/A N/A N/A mock side_effect N/A N/A requests exceptions SSLError N/A N/A N/A self assertRaises InvalidProxyCallback N/A N/A N/A N/A N/A ProxyGrantingTicket objects validate_callback http://www.example.com/ https://www.example.org/ N/A self pgtid N/A self pgtiou N/A test_validate_callback_connection_error N/A N/A self N/A N/A N/A 
        If the validation request encounters a connection error, an
        InvalidProxyCallback should be raised.
         N/A N/A patch requests.get mock N/A N/A N/A mock side_effect N/A N/A requests exceptions ConnectionError N/A N/A N/A self assertRaises InvalidProxyCallback N/A N/A N/A N/A N/A ProxyGrantingTicket objects validate_callback http://www.example.com/ https://www.example.org/ N/A self pgtid N/A self pgtiou N/A test_validate_callback_timeout N/A N/A self N/A N/A N/A 
        If the validation request times out, an InvalidProxyCallback
        should be raised.
         N/A N/A patch requests.get mock N/A N/A N/A mock side_effect N/A N/A requests exceptions Timeout N/A N/A N/A self assertRaises InvalidProxyCallback N/A N/A N/A N/A N/A ProxyGrantingTicket objects validate_callback http://www.example.com/ https://www.example.org/ N/A self pgtid N/A self pgtiou N/A test_validate_callback_invalid_status N/A N/A self N/A N/A N/A 
        If the validation request returns an invalid status code, an
        InvalidProxyCallback should be raised.
         N/A N/A patch requests.get mock N/A N/A N/A N/A N/A mock return_value raise_for_status side_effect N/A N/A requests exceptions HTTPError N/A N/A N/A self assertRaises InvalidProxyCallback N/A N/A N/A N/A N/A ProxyGrantingTicket objects validate_callback http://www.example.com/ https://www.example.org/ N/A self pgtid N/A self pgtiou N/A test_validate_ticket N/A N/A self N/A N/A N/A 
        Validation ought to succeed when provided with a valid ticket
        string and data. The ticket should not be consumed in the
        process.
         N/A pgt N/A ProxyGrantingTicketFactory N/A ticket N/A N/A N/A ProxyGrantingTicket objects validate_ticket N/A pgt ticket https://www.example.com N/A N/A N/A self assertEqual ticket pgt N/A N/A N/A self assertFalse N/A N/A ticket is_consumed N/A test_validate_ticket_no_ticket N/A N/A self N/A N/A N/A 
        The validation process ought to fail when no ticket string is
        provided.
         N/A N/A N/A self assertRaises InvalidRequest N/A N/A N/A N/A N/A ProxyGrantingTicket objects validate_ticket None https://www.example.com N/A test_validate_ticket_no_service N/A N/A self N/A N/A N/A 
        The validation process ought to fail when no service identifier
        is provided.
         N/A pgt N/A ProxyGrantingTicketFactory N/A N/A N/A self assertRaises InvalidRequest N/A N/A N/A N/A N/A ProxyGrantingTicket objects validate_ticket N/A pgt ticket None N/A test_validate_ticket_invalid_ticket N/A N/A self N/A N/A N/A 
        The validation process ought to fail when an invalid ticket
        string is provided.
         N/A N/A N/A self assertRaises InvalidTicket N/A N/A N/A N/A N/A ProxyGrantingTicket objects validate_ticket 12345 https://www.example.com N/A test_validate_ticket_does_not_exist N/A N/A self N/A N/A N/A 
        The validation process ought to fail when a valid ticket string
        cannot be found in the database.
         N/A ticket PGT-0000000000-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa N/A N/A N/A self assertRaises InvalidTicket N/A N/A N/A N/A N/A ProxyGrantingTicket objects validate_ticket ticket https://www.example.com N/A test_validate_ticket_consumed_ticket N/A N/A self N/A N/A N/A 
        The validation process ought to fail when a consumed ticket
        is provided.
         N/A pgt N/A ConsumedProxyGrantingTicketFactory N/A N/A N/A self assertRaises InvalidTicket N/A N/A N/A N/A N/A ProxyGrantingTicket objects validate_ticket N/A pgt ticket https://www.example.com N/A test_validate_ticket_expired_ticket N/A N/A self N/A N/A N/A 
        The validation process ought to fail when an expired ticket
        is provided.
         N/A pgt N/A ExpiredProxyGrantingTicketFactory N/A N/A N/A self assertRaises InvalidTicket N/A N/A N/A N/A N/A ProxyGrantingTicket objects validate_ticket N/A pgt ticket https://www.example.com N/A test_validate_ticket_invalid_service N/A N/A self N/A N/A N/A 
        The validation process ought to fail when an invalid service
        identifier is provided.
         N/A pgt N/A ProxyGrantingTicketFactory N/A N/A N/A self assertRaises InvalidService N/A N/A N/A N/A N/A ProxyGrantingTicket objects validate_ticket N/A pgt ticket http://www.example.org N/A N/A ProxyGrantingTicketTests N/A TestCase N/A N/A 
    Test the ``ProxyGrantingTicket`` model.
     test_create_proxy_granting_ticket N/A N/A self N/A N/A N/A 
        A ``ProxyGrantingTicket`` ought to be created with an
        appropriate prefix.
         N/A pgt N/A ProxyGrantingTicketFactory N/A N/A N/A self assertTrue N/A N/A N/A pgt ticket startswith N/A pgt TICKET_PREFIX N/A N/A ManagementCommandTests N/A TestCase N/A N/A 
    Test management commands that operate on tickets.
     test_cleanupcas_management_command N/A N/A self N/A N/A N/A 
        The ``cleanupcas`` management command should delete tickets
        that are expired or consumed.
         N/A st N/A ConsumedServiceTicketFactory N/A pgt N/A ExpiredProxyGrantingTicketFactory granted_by_st st N/A N/A ConsumedProxyTicketFactory granted_by_pgt pgt N/A N/A N/A management call_command cleanupcas N/A N/A N/A self assertEqual N/A N/A N/A ServiceTicket objects count 0 N/A N/A N/A self assertEqual N/A N/A N/A ProxyGrantingTicket objects count 0 N/A N/A N/A self assertEqual N/A N/A N/A ProxyTicket objects count 0 N/A test_cleanupcas_management_command_chain N/A N/A self N/A N/A N/A 
        The ``cleanupcas`` management command should delete chains of
        invalid tickets.
         N/A st N/A ConsumedServiceTicketFactory N/A pgt N/A ExpiredProxyGrantingTicketFactory expires N/A N/A now N/A timedelta seconds 5 granted_by_st st N/A pt N/A ConsumedProxyTicketFactory granted_by_pgt pgt N/A pgt2 N/A ExpiredProxyGrantingTicketFactory granted_by_st None granted_by_pt pt N/A N/A ConsumedProxyTicketFactory granted_by_pgt pgt2 N/A N/A N/A management call_command cleanupcas N/A N/A N/A self assertEqual N/A N/A N/A ServiceTicket objects count 0 N/A N/A N/A self assertEqual N/A N/A N/A ProxyGrantingTicket objects count 0 N/A N/A N/A self assertEqual N/A N/A N/A ProxyTicket objects count 0 N/A N/A