Hello ! I'm having some issues in django unit testing. Is there anybody to help ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Hello ! I'm having some issues in django unit testing. Is there anybody to help ?

Nilima Dahal
Hello ! I'm having some issues in django unit testing. Is there anybody to help ? 
I'm having confusion in testing django mixins . Can anyone share his/her git with such unit testing or have some experienced shareable codes.

how do I test this ?

def dispatch(self,request,*args,**kwargs):
        if self.request.user.is_superuser:
            return super().dispatch(request, *args, **kwargs)
        return self.handle_no_permission()



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/44f22b97-7499-4762-92d2-59fa6dd6ad8bn%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Hello ! I'm having some issues in django unit testing. Is there anybody to help ?

Monaco investment
Am having hard time learning django...can someone please get in touch...I will be really grateful... thanks


From: [hidden email] <[hidden email]> on behalf of Nilima Dahal <[hidden email]>
Sent: Friday, November 6, 2020 1:11:59 PM
To: Django users <[hidden email]>
Subject: Hello ! I'm having some issues in django unit testing. Is there anybody to help ?
 
Hello ! I'm having some issues in django unit testing. Is there anybody to help ? 
I'm having confusion in testing django mixins . Can anyone share his/her git with such unit testing or have some experienced shareable codes.

how do I test this ?

def dispatch(self,request,*args,**kwargs):
        if self.request.user.is_superuser:
            return super().dispatch(request, *args, **kwargs)
        return self.handle_no_permission()



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/44f22b97-7499-4762-92d2-59fa6dd6ad8bn%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/AM6PR03MB595708923241D013CF47325AA7EC0%40AM6PR03MB5957.eurprd03.prod.outlook.com.