示例#1
0
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")
示例#2
0
 def test_empty_project(self):
     self.assertEqual(getUserProject(self.emptyProjectUser)['projects'], [])
示例#3
0
 def test_empty_project(self):
     self.assertEqual(getUserProject(self.emptyProjectUser)['projects'],[])
示例#4
0
 def test_normal(self):
     self.assertTrue(getUserProject(self.user)['isSuccessful'])
示例#5
0
 def test_normal(self):
     self.assertTrue(getUserProject(self.user)['isSuccessful'])