Exemple #1
0
def ticket_admin_util(model_admin_util):
    model_admin_util.model_admin = admin.TicketAdmin(Ticket, AdminSite())
    model_admin_util.model_admin.message_user = Mock(name='message_user')
    model_admin_util.model_admin.get_request_helpdeskuser = (Mock(
        name='get_request_helpdeskuser', return_value=model_admin_util.user))
    model_admin_util.obj = Mock(spec=Ticket)

    return model_admin_util
Exemple #2
0
 def setUp(self):
     self.ticket_admin = admin.TicketAdmin(Ticket, AdminSite())
     self.fake_pk = 1