def getUserProjects(request): userObj = getCurrentUserObj(request) if not userObj: result = {'isSuccessful' : False} return HttpResponse(json.dumps(result), content_type="application/json") result = getUserProject(userObj) return HttpResponse(json.dumps(result), content_type="application/json")
def test_empty_project(self): self.assertEqual(getUserProject(self.emptyProjectUser)['projects'], [])
def test_empty_project(self): self.assertEqual(getUserProject(self.emptyProjectUser)['projects'],[])
def test_normal(self): self.assertTrue(getUserProject(self.user)['isSuccessful'])