creating n random points on face of mesh
as it is written bpy_extras.mesh_utils.face_random_points(num_points, tessfaces) takes tessfaces not faces and to get access to the you'll have to calculate first :

obj = bpy.context.object #Gets the object
me = obj.data
me.calc_tessface() # recalculate tessfaces
tessfaces_select = [f for f in me.tessfaces if f.select]
bpy_extras.mesh_utils.face_random_points(400, tessfaces_select)