r47277 - reactor fixes

hawkowl-TA+aISz0psMTMxyoc4vAAJOcrHinNvQL0E9HWUfgJXw@public.gmane.org Sun, 17 Apr 2016 01:22:03 -0600 (MDT)
Newsgroups gmane.comp.python.twisted.commits
Message-ID <[email protected]>
Author: hawkowl
Date: Sun Apr 17 01:21:59 2016
New Revision: 47277

Modified:
   branches/reactor-app-py3-8299/twisted/test/test_twistd.py

Log:
reactor fixes

Modified: branches/reactor-app-py3-8299/twisted/test/test_twistd.py
==============================================================================
--- branches/reactor-app-py3-8299/twisted/test/test_twistd.py	(original)
+++ branches/reactor-app-py3-8299/twisted/test/test_twistd.py	Sun Apr 17 01:21:59 2016
@@ -257,6 +257,19 @@
                 helpOutput,))
 
 
+    def test_reactor(self):
+        """
+        The reactor is selected by C{--reactor}.
+        """
+        calls = []
+        self.patch(app, "installReactor", calls.append)
+
+        config = twistd.ServerOptions()
+        config.parseOptions(["--reactor", "default"])
+        self.assertEqual(len(calls), 1)
+        self.assertEqual(calls, ['default'])
+
+
     def test_postOptionsSubCommandCausesNoSave(self):
         """
         postOptions should set no_save to True when a subcommand is used.