Index: django/test/simple.py
===================================================================
--- django/test/simple.py	(revision 11726)
+++ django/test/simple.py	(working copy)
@@ -5,22 +5,19 @@
 from django.test.utils import setup_test_environment, teardown_test_environment
 from django.test.testcases import OutputChecker, DocTestRunner, TestCase
 
-# The module name for tests outside models.py
-TEST_MODULE = 'tests'
-
 doctestOutputChecker = OutputChecker()
 
-def get_tests(app_module):
+def get_tests(app_module, submodule_name):
     try:
         app_path = app_module.__name__.split('.')[:-1]
-        test_module = __import__('.'.join(app_path + [TEST_MODULE]), {}, {}, TEST_MODULE)
+        test_module = __import__('.'.join(app_path + [submodule_name]), {}, {}, submodule_name)
     except ImportError, e:
         # Couldn't import tests.py. Was it due to a missing file, or
         # due to an import error in a tests.py that actually exists?
         import os.path
         from imp import find_module
         try:
-            mod = find_module(TEST_MODULE, [os.path.dirname(app_module.__file__)])
+            mod = find_module(submodule_name, [os.path.dirname(app_module.__file__)])
         except ImportError:
             # 'tests' module doesn't exist. Move on.
             test_module = None
@@ -55,7 +52,7 @@
 
     # Check to see if a separate 'tests' module exists parallel to the
     # models module
-    test_module = get_tests(app_module)
+    test_module = get_tests(app_module, 'tests')
     if test_module:
         # Load unit and doctests in the tests.py module. If module has
         # a suite() method, use it. Otherwise build the test suite ourselves.
@@ -79,27 +76,54 @@
 
     """
     parts = label.split('.')
-    if len(parts) < 2 or len(parts) > 3:
-        raise ValueError("Test label '%s' should be of the form app.TestCase or app.TestCase.test_method" % label)
+    if len(parts) < 2 or len(parts) > 4:
+        raise ValueError("Test label '%s' should be of the form app.TestCase or app.TestCase.test_method or app.module.TestCase.test_method" % label)
 
-    app_module = get_app(parts[0])
-    TestClass = getattr(app_module, parts[1], None)
+    # parse out the configs.
+    label_part_app = parts[0]
+    label_part_module = None
+    label_part_class = None
+    label_part_method = None
+    if len(parts) == 2:
+        # app.TestClass
+        label_part_class = parts[1]
+    elif len(parts) == 3:
+        # app.TestClass.test_method
+        label_part_class = parts[1]
+        label_part_method = parts[2]
+    else:
+        # app.module.TestClass.test_method
+        label_part_module = parts[1]
+        label_part_class = parts[2]
+        label_part_method = parts[3]
 
-    # Couldn't find the test class in models.py; look in tests.py
-    if TestClass is None:
-        test_module = get_tests(app_module)
+    # Figure out where we're going to look for the TestCase
+    # If it's not explicitly specified, look for it in .models or .tests by
+    # default.
+    modules_to_search = ['models', 'tests']
+    if label_part_module is not None:
+        modules_to_search = [label_part_module]
+
+
+    app_module = get_app(label_part_app)
+    TestClass = None
+    for submodule_name in modules_to_search:
+        test_module = get_tests(app_module, submodule_name)
         if test_module:
-            TestClass = getattr(test_module, parts[1], None)
+            TestClass = getattr(test_module, label_part_class, None)
+            if TestClass:
+              break
 
-    if len(parts) == 2: # label is app.TestClass
-        try:
-            return unittest.TestLoader().loadTestsFromTestCase(TestClass)
-        except TypeError:
-            raise ValueError("Test label '%s' does not refer to a test class" % label)
+    if label_part_method is None or label_part_method == '*':
+      # label specifies just a TestClass or the '*' indicates all tests.
+      try:
+          return unittest.TestLoader().loadTestsFromTestCase(TestClass)
+      except TypeError:
+          raise ValueError("Test label '%s' does not refer to a test class" % label)
     else: # label is app.TestClass.test_method
-        if not TestClass:
-            raise ValueError("Test label '%s' does not refer to a test class" % label)
-        return TestClass(parts[2])
+      if not TestClass:
+          raise ValueError("Test label '%s' does not refer to a test class" % label)
+      return TestClass(label_part_method)
 
 # Python 2.3 compatibility: TestSuites were made iterable in 2.4.
 # We need to iterate over them, so we add the missing method when
