Example #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')
Example #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')
Example #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')
Example #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')