コード例 #1
0
    def test_delete_by_userid(self):
        self._insert_rightcallmember(1, 2)
        self._insert_rightcallmember(3, 4)
        rightcall_member_dao.delete_by_userid(1)

        result = rightcall_member_dao.get_by_userid(1)
        self.assertEquals(result, [])
        result = rightcall_member_dao.get_by_userid(3)
        self.assertEquals(len(result), 1)
コード例 #2
0
 def test_get_by_userid(self):
     self._insert_rightcallmember(1, 2)
     self._insert_rightcallmember(3, 4)
     result = rightcall_member_dao.get_by_userid(1)
     self.assertEquals(len(result), 1)
     self.assertEquals(result[0].typeval, '1')
     self.assertEquals(result[0].rightcallid, 2)