Beispiel #1
0
 def test_null_list(self):
     self.assertEqual(cmp(formatProjectList([]), []), 0)
Beispiel #2
0
 def test_null_list(self):
     self.assertEqual(cmp(formatProjectList([]),[]),0)
Beispiel #3
0
            'name': unicode(self.project1.project_name, "utf-8"),
            'creator': unicode(self.user.userName, "utf-8"),
            'function': None,
            'track': None,
        }
        self.p2 = {
            'id': 2L,
            'name': unicode(self.project2.project_name, "utf-8"),
            'creator': unicode(self.user.userName, "utf-8"),
            'function': None,
            'track': None,
        }
        self.predictResult.append(self.p1)
        self.predictResult.append(self.p2)
        self.assertEqual(
            cmp(formatProjectList(self.projectList), self.predictResult), 0)

    def test_null_list(self):
        self.assertEqual(cmp(formatProjectList([]), []), 0)


class getChainListTestCase(TestCase):
    def setUp(self):
        #initial information into temperory database
        self.user = User()
        self.user.username = "******"
        self.user.password = "******"
        self.user.email = "email"
        self.user.is_confirmed = True
        self.user.save()
Beispiel #4
0
            'id':1L,
            'name':unicode(self.project1.project_name,"utf-8"),
            'creator':unicode(self.user.username,"utf-8"),
            'function':None,
            'track':None,
        }
        self.p2 = {
            'id':2L,
            'name':unicode(self.project2.project_name, "utf-8"),
            'creator':unicode(self.user.username,"utf-8"),
            'function':None,
            'track':None,
        }
        self.predictResult.append(self.p1)
        self.predictResult.append(self.p2)
        self.assertEqual(cmp(formatProjectList(self.projectList),self.predictResult), 1)
        

    def test_null_list(self):
        self.assertEqual(cmp(formatProjectList([]),[]),0)

class getChainListTestCase(TestCase):
    def setUp(self):
        #initial information into temperory database
        self.user = User()
        self.user.username = "******"
        self.user.password = "******"
        self.user.email = "email"
        self.user.is_confirmed = True
        self.user.save()