I have a function as
def getEvents(eid, request):
......
Now I want to write unit test for the above function separately (without calli
You can use django test client
from django.test import Client
c = Client()
response = c.post('/login/', {'username': 'john', 'password': 'smith'})
response.status_code
response = c.get('/customer/details/')
response.content
for more details
https://docs.djangoproject.com/en/1.11/topics/testing/tools/#overview-and-a-quick-example