Saute onion in oil, just until softened. Add garlic and stir for 30 seconds. Add tomatoes, tomato sauce, chilies, oregano, basil, salt, and pepper. Bring to a boil. Reduce heat and simmer for 15 minutes.
Combine the black beans and refried beans in a bowl. Combine both types of cheeses in a separate bowl.
Place 6 tablespoons or 1/10th of the beans and about 2 tablespoons of cheese in a tortilla. Roll it up and place it in and ungreased 9 x 13 baking dish. Repeat with all 10 tortillas.
Pour the sauce on top and sprinkle with the remaining cheese. Bake at 350 degrees for 20 minutes.