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