EDIT:
Solution: assign face.material_index for each face too.
I’m writing a 3d format importer and the model file contains the texture data. I generate a Texture object from the data and assign it to a Material I created, but I can’t see the texture in the 3d view (if I enable “Textured” mode), only when I render a frame.
By my test this is also the case when you create an object in blender, add material to it, add texture to that material and set it’s mode to UV mapping. No matter what rendering option you use or if you enable textured mode or not, the object is white. Texture only visible if you load the image in the UV/Image editor or render a frame.
So this must be something obvious. Not limited to the Python API.