def connect(self): 
        try:
            self.connection = pymongo.Connection(self.host, self.port)
            self.db = self.connection[self.name]
        except AutoReconnect:
            raise DatabaseException("It's not possible connect to the database")
def test_unwatch_task(client):
    user = f.UserFactory.create()
    task = f.create_task(owner=user, milestone=None)
    f.MembershipFactory.create(project=task.project, user=user, is_admin=True)
    url = reverse("tasks-watch", args=(task.id,))

    client.login(user)
    response = client.post(url)

    assert response.status_code == 200