@patch('green.djangorunner.GreenTestSuite')
    @patch('green.djangorunner.run')
    @patch('green.djangorunner.loadTargets')
    def test_run_noTests(self, mock_loadTargets, mock_run, mock_GreenTestSuite):
        dr = djangorunner.DjangoRunner()

        dr.setup_test_environment        = MagicMock()
        dr.setup_databases               = MagicMock()
        dr.teardown_databases            = MagicMock()
        dr.teardown_test_environment     = MagicMock()
        mock_loadTargets.return_value    = None
        mock_GreenTestSuite.return_value = 123

        dr.run_tests((), testing=True)

        self.assertEqual(mock_run.call_args[0][0], 123)
Create a new request.
dataset/ETHPy150Open CleanCut/green/green/test/test_djangorunner.py/TestDjangoRunner.test_run_noTests--crossover with--dataset/ETHPy150Open Zimbra-Community/python-zimbra/pythonzimbra/request_xml.py/RequestXml.__init__