コード例 #1
0
    def test_obj_get(self):
        rr = RadGroupResource()
        obj = rr.obj_get(None, pk='default')
        self.assertEqual(obj.groupname, 'default')

        self.assertRaises(NotFound, rr.obj_get, None, pk='default2')
コード例 #2
0
    def test_obj_get(self):
        rr = RadGroupResource()
        obj = rr.obj_get(None, pk='default')
        self.assertEqual(obj.groupname, 'default')

        self.assertRaises(NotFound, rr.obj_get, None, pk='default2')
コード例 #3
0
 def test_obj_get_list(self):
     rr = RadGroupResource()
     obj_list = rr.obj_get_list()
     self.assertEqual(len(obj_list), 2)
     self.assertEqual(obj_list[0].groupname, 'default')
コード例 #4
0
 def test_obj_get_list(self):
     rr = RadGroupResource()
     obj_list = rr.obj_get_list()
     self.assertEqual(len(obj_list), 2)
     self.assertEqual(obj_list[0].groupname, 'default')