'Login with test user.
Since, only active users can login, so we must activate the user before login.
This method does the following tasks in order,
1. Stores user\'s active/in-active status in a variable.
2. Makes sure user account is active.
3. Authenticated user with the client.
4. Reverts user\'s original active/in-active status.'

def login(self):

    is_active = self.user.is_active
    self.user.is_active = True
    self.user.save()
    self.client.login(username=self.username, password=self.password)
    self.user.is_active = is_active
    self.user.save()
