willingc

jhtest-post-segfault

Nov 15th, 2016
419
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 149.07 KB | None | 0 0
  1. clearsource activate test-Ana3-jh
  2. source deactivate
  3. pytest jupyterhub/tests
  4. ====================================================== test session starts ======================================================
  5. platform darwin -- Python 3.5.2, pytest-3.0.4, py-1.4.31, pluggy-0.4.0
  6. rootdir: /Users/carol/test-sandbox-Ana/jupyterhub, inifile:
  7. plugins: cov-2.4.0
  8. 
  9. collecting 0 items
  10. collecting 33 items
  11. collecting 42 items
  12. collecting 55 items
  13. collecting 57 items
  14. collecting 67 items
  15. collecting 86 items
  16. collecting 89 items
  17. collecting 92 items
  18. collecting 96 items
  19. collecting 96 items
  20. collecting 100 items
  21. collecting 107 items
  22. collecting 110 items
  23. collected 110 items
  24. 
  25. jupyterhub/tests/test_api.py EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
  26. jupyterhub/tests/test_app.py .........
  27. jupyterhub/tests/test_auth.py .........E...
  28. jupyterhub/tests/test_db.py ..
  29. jupyterhub/tests/test_orm.py ..........
  30. jupyterhub/tests/test_pages.py EEEEEEEEEEEEEEEEEEE
  31. jupyterhub/tests/test_proxy.py FEE
  32. jupyterhub/tests/test_services.py EEE
  33. jupyterhub/tests/test_services_auth.py ...E
  34. jupyterhub/tests/test_singleuser.py EE..
  35. jupyterhub/tests/test_spawner.py .......
  36. jupyterhub/tests/test_traitlets.py ...
  37.  
  38. ============================================================ ERRORS =============================================================
  39. ________________________________________________ ERROR at setup of test_auth_api ________________________________________________
  40.  
  41. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  42.  
  43.     @fixture(scope='module')
  44.     def app(request):
  45.         app = MockHub.instance(log_level=logging.DEBUG)
  46. >       app.start([])
  47.  
  48. jupyterhub/tests/conftest.py:55:
  49. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  50.  
  51. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  52.  
  53.     def start(self, argv=None):
  54.         self.db_file = NamedTemporaryFile()
  55.         self.pid_file = NamedTemporaryFile(delete=False).name
  56.         self.db_url = self.db_file.name
  57.     
  58.         evt = threading.Event()
  59.     
  60.         @gen.coroutine
  61.         def _start_co():
  62.             assert self.io_loop._running
  63.             # put initialize in start for SQLAlchemy threading reasons
  64.             yield super(MockHub, self).initialize(argv=argv)
  65.             # add an initial user
  66.             user = orm.User(name='user')
  67.             self.db.add(user)
  68.             self.db.commit()
  69.             yield super(MockHub, self).start()
  70.             yield self.hub.server.wait_up(http=True)
  71.             self.io_loop.add_callback(evt.set)
  72.     
  73.         def _start():
  74.             self.io_loop = IOLoop()
  75.             self.io_loop.make_current()
  76.             self.io_loop.add_callback(_start_co)
  77.             self.io_loop.start()
  78.     
  79.         self._thread = threading.Thread(target=_start)
  80.         self._thread.start()
  81.         ready = evt.wait(timeout=10)
  82. >       assert ready
  83. E       AssertionError
  84.  
  85. jupyterhub/tests/mocking.py:178: AssertionError
  86. ----------------------------------------------------- Captured stderr setup -----------------------------------------------------
  87. [D 2016-11-15 10:13:03.867 MockHub application:555] Looking for jupyterhub_config in /Users/carol/test-sandbox-Ana/jupyterhub
  88. [D 2016-11-15 10:13:03.868 MockHub app:1280] Writing PID 16448 to /var/folders/6w/ngfnsn257lg4bs8drj96f92w0000gn/T/tmpeswtdulk
  89. [I 2016-11-15 10:13:03.868 MockHub app:724] Loading cookie_secret from /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub_cookie_secret
  90. [D 2016-11-15 10:13:03.869 MockHub app:796] Connecting to db: sqlite:////var/folders/6w/ngfnsn257lg4bs8drj96f92w0000gn/T/tmpq1f3x5dn
  91. [W 2016-11-15 10:13:03.919 MockHub app:365]
  92.     Generating CONFIGPROXY_AUTH_TOKEN. Restarting the Hub will require restarting the proxy.
  93.     Set CONFIGPROXY_AUTH_TOKEN env or JupyterHub.proxy_auth_token config to avoid this message.
  94.    
  95. [I 2016-11-15 10:13:03.927 MockHub app:892] Not using whitelist. Any authenticated user will be allowed.
  96. [D 2016-11-15 10:13:03.938 MockHub app:1082] Loading state for admin from db
  97. [D 2016-11-15 10:13:03.938 MockHub app:1094] admin not running.
  98. [D 2016-11-15 10:13:03.938 MockHub app:1099] Loaded users:
  99.        admin admin
  100. [I 2016-11-15 10:13:03.949 MockHub app:1450] Hub API listening on http://127.0.0.1:8081/@/space%20word/hub/
  101. [D 2016-11-15 10:13:03.953 MockHub orm:146] Fetching GET http://127.0.0.1:8001/api/routes
  102. [E 2016-11-15 10:13:03.956 MockHub app:1136] Proxy appears to be running at http://127.0.0.1:8000/@/space%20word/, but I can't access it (HTTP 403: Forbidden)
  103.    Did CONFIGPROXY_AUTH_TOKEN change?
  104. [D 2016-11-15 10:13:03.956 MockHub application:647] Exiting application: jupyterhub
  105. _____________________________________________ ERROR at setup of test_referer_check ______________________________________________
  106.  
  107. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  108.  
  109.     @fixture(scope='module')
  110.     def app(request):
  111.         app = MockHub.instance(log_level=logging.DEBUG)
  112. >       app.start([])
  113.  
  114. jupyterhub/tests/conftest.py:55:
  115. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  116.  
  117. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  118.  
  119.     def start(self, argv=None):
  120.         self.db_file = NamedTemporaryFile()
  121.         self.pid_file = NamedTemporaryFile(delete=False).name
  122.         self.db_url = self.db_file.name
  123.     
  124.         evt = threading.Event()
  125.     
  126.         @gen.coroutine
  127.         def _start_co():
  128.             assert self.io_loop._running
  129.             # put initialize in start for SQLAlchemy threading reasons
  130.             yield super(MockHub, self).initialize(argv=argv)
  131.             # add an initial user
  132.             user = orm.User(name='user')
  133.             self.db.add(user)
  134.             self.db.commit()
  135.             yield super(MockHub, self).start()
  136.             yield self.hub.server.wait_up(http=True)
  137.             self.io_loop.add_callback(evt.set)
  138.     
  139.         def _start():
  140.             self.io_loop = IOLoop()
  141.             self.io_loop.make_current()
  142.             self.io_loop.add_callback(_start_co)
  143.             self.io_loop.start()
  144.     
  145.         self._thread = threading.Thread(target=_start)
  146.         self._thread.start()
  147.         ready = evt.wait(timeout=10)
  148. >       assert ready
  149. E       AssertionError
  150.  
  151. jupyterhub/tests/mocking.py:178: AssertionError
  152. _______________________________________________ ERROR at setup of test_get_users ________________________________________________
  153.  
  154. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  155.  
  156.     @fixture(scope='module')
  157.     def app(request):
  158.         app = MockHub.instance(log_level=logging.DEBUG)
  159. >       app.start([])
  160.  
  161. jupyterhub/tests/conftest.py:55:
  162. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  163.  
  164. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  165.  
  166.     def start(self, argv=None):
  167.         self.db_file = NamedTemporaryFile()
  168.         self.pid_file = NamedTemporaryFile(delete=False).name
  169.         self.db_url = self.db_file.name
  170.     
  171.         evt = threading.Event()
  172.     
  173.         @gen.coroutine
  174.         def _start_co():
  175.             assert self.io_loop._running
  176.             # put initialize in start for SQLAlchemy threading reasons
  177.             yield super(MockHub, self).initialize(argv=argv)
  178.             # add an initial user
  179.             user = orm.User(name='user')
  180.             self.db.add(user)
  181.             self.db.commit()
  182.             yield super(MockHub, self).start()
  183.             yield self.hub.server.wait_up(http=True)
  184.             self.io_loop.add_callback(evt.set)
  185.     
  186.         def _start():
  187.             self.io_loop = IOLoop()
  188.             self.io_loop.make_current()
  189.             self.io_loop.add_callback(_start_co)
  190.             self.io_loop.start()
  191.     
  192.         self._thread = threading.Thread(target=_start)
  193.         self._thread.start()
  194.         ready = evt.wait(timeout=10)
  195. >       assert ready
  196. E       AssertionError
  197.  
  198. jupyterhub/tests/mocking.py:178: AssertionError
  199. ________________________________________________ ERROR at setup of test_add_user ________________________________________________
  200.  
  201. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  202.  
  203.     @fixture(scope='module')
  204.     def app(request):
  205.         app = MockHub.instance(log_level=logging.DEBUG)
  206. >       app.start([])
  207.  
  208. jupyterhub/tests/conftest.py:55:
  209. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  210.  
  211. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  212.  
  213.     def start(self, argv=None):
  214.         self.db_file = NamedTemporaryFile()
  215.         self.pid_file = NamedTemporaryFile(delete=False).name
  216.         self.db_url = self.db_file.name
  217.     
  218.         evt = threading.Event()
  219.     
  220.         @gen.coroutine
  221.         def _start_co():
  222.             assert self.io_loop._running
  223.             # put initialize in start for SQLAlchemy threading reasons
  224.             yield super(MockHub, self).initialize(argv=argv)
  225.             # add an initial user
  226.             user = orm.User(name='user')
  227.             self.db.add(user)
  228.             self.db.commit()
  229.             yield super(MockHub, self).start()
  230.             yield self.hub.server.wait_up(http=True)
  231.             self.io_loop.add_callback(evt.set)
  232.     
  233.         def _start():
  234.             self.io_loop = IOLoop()
  235.             self.io_loop.make_current()
  236.             self.io_loop.add_callback(_start_co)
  237.             self.io_loop.start()
  238.     
  239.         self._thread = threading.Thread(target=_start)
  240.         self._thread.start()
  241.         ready = evt.wait(timeout=10)
  242. >       assert ready
  243. E       AssertionError
  244.  
  245. jupyterhub/tests/mocking.py:178: AssertionError
  246. ________________________________________________ ERROR at setup of test_get_user ________________________________________________
  247.  
  248. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  249.  
  250.     @fixture(scope='module')
  251.     def app(request):
  252.         app = MockHub.instance(log_level=logging.DEBUG)
  253. >       app.start([])
  254.  
  255. jupyterhub/tests/conftest.py:55:
  256. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  257.  
  258. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  259.  
  260.     def start(self, argv=None):
  261.         self.db_file = NamedTemporaryFile()
  262.         self.pid_file = NamedTemporaryFile(delete=False).name
  263.         self.db_url = self.db_file.name
  264.     
  265.         evt = threading.Event()
  266.     
  267.         @gen.coroutine
  268.         def _start_co():
  269.             assert self.io_loop._running
  270.             # put initialize in start for SQLAlchemy threading reasons
  271.             yield super(MockHub, self).initialize(argv=argv)
  272.             # add an initial user
  273.             user = orm.User(name='user')
  274.             self.db.add(user)
  275.             self.db.commit()
  276.             yield super(MockHub, self).start()
  277.             yield self.hub.server.wait_up(http=True)
  278.             self.io_loop.add_callback(evt.set)
  279.     
  280.         def _start():
  281.             self.io_loop = IOLoop()
  282.             self.io_loop.make_current()
  283.             self.io_loop.add_callback(_start_co)
  284.             self.io_loop.start()
  285.     
  286.         self._thread = threading.Thread(target=_start)
  287.         self._thread.start()
  288.         ready = evt.wait(timeout=10)
  289. >       assert ready
  290. E       AssertionError
  291.  
  292. jupyterhub/tests/mocking.py:178: AssertionError
  293. ___________________________________________ ERROR at setup of test_add_multi_user_bad ___________________________________________
  294.  
  295. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  296.  
  297.     @fixture(scope='module')
  298.     def app(request):
  299.         app = MockHub.instance(log_level=logging.DEBUG)
  300. >       app.start([])
  301.  
  302. jupyterhub/tests/conftest.py:55:
  303. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  304.  
  305. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  306.  
  307.     def start(self, argv=None):
  308.         self.db_file = NamedTemporaryFile()
  309.         self.pid_file = NamedTemporaryFile(delete=False).name
  310.         self.db_url = self.db_file.name
  311.     
  312.         evt = threading.Event()
  313.     
  314.         @gen.coroutine
  315.         def _start_co():
  316.             assert self.io_loop._running
  317.             # put initialize in start for SQLAlchemy threading reasons
  318.             yield super(MockHub, self).initialize(argv=argv)
  319.             # add an initial user
  320.             user = orm.User(name='user')
  321.             self.db.add(user)
  322.             self.db.commit()
  323.             yield super(MockHub, self).start()
  324.             yield self.hub.server.wait_up(http=True)
  325.             self.io_loop.add_callback(evt.set)
  326.     
  327.         def _start():
  328.             self.io_loop = IOLoop()
  329.             self.io_loop.make_current()
  330.             self.io_loop.add_callback(_start_co)
  331.             self.io_loop.start()
  332.     
  333.         self._thread = threading.Thread(target=_start)
  334.         self._thread.start()
  335.         ready = evt.wait(timeout=10)
  336. >       assert ready
  337. E       AssertionError
  338.  
  339. jupyterhub/tests/mocking.py:178: AssertionError
  340. _________________________________________ ERROR at setup of test_add_multi_user_invalid _________________________________________
  341.  
  342. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  343.  
  344.     @fixture(scope='module')
  345.     def app(request):
  346.         app = MockHub.instance(log_level=logging.DEBUG)
  347. >       app.start([])
  348.  
  349. jupyterhub/tests/conftest.py:55:
  350. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  351.  
  352. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  353.  
  354.     def start(self, argv=None):
  355.         self.db_file = NamedTemporaryFile()
  356.         self.pid_file = NamedTemporaryFile(delete=False).name
  357.         self.db_url = self.db_file.name
  358.     
  359.         evt = threading.Event()
  360.     
  361.         @gen.coroutine
  362.         def _start_co():
  363.             assert self.io_loop._running
  364.             # put initialize in start for SQLAlchemy threading reasons
  365.             yield super(MockHub, self).initialize(argv=argv)
  366.             # add an initial user
  367.             user = orm.User(name='user')
  368.             self.db.add(user)
  369.             self.db.commit()
  370.             yield super(MockHub, self).start()
  371.             yield self.hub.server.wait_up(http=True)
  372.             self.io_loop.add_callback(evt.set)
  373.     
  374.         def _start():
  375.             self.io_loop = IOLoop()
  376.             self.io_loop.make_current()
  377.             self.io_loop.add_callback(_start_co)
  378.             self.io_loop.start()
  379.     
  380.         self._thread = threading.Thread(target=_start)
  381.         self._thread.start()
  382.         ready = evt.wait(timeout=10)
  383. >       assert ready
  384. E       AssertionError
  385.  
  386. jupyterhub/tests/mocking.py:178: AssertionError
  387. _____________________________________________ ERROR at setup of test_add_multi_user _____________________________________________
  388.  
  389. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  390.  
  391.     @fixture(scope='module')
  392.     def app(request):
  393.         app = MockHub.instance(log_level=logging.DEBUG)
  394. >       app.start([])
  395.  
  396. jupyterhub/tests/conftest.py:55:
  397. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  398.  
  399. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  400.  
  401.     def start(self, argv=None):
  402.         self.db_file = NamedTemporaryFile()
  403.         self.pid_file = NamedTemporaryFile(delete=False).name
  404.         self.db_url = self.db_file.name
  405.     
  406.         evt = threading.Event()
  407.     
  408.         @gen.coroutine
  409.         def _start_co():
  410.             assert self.io_loop._running
  411.             # put initialize in start for SQLAlchemy threading reasons
  412.             yield super(MockHub, self).initialize(argv=argv)
  413.             # add an initial user
  414.             user = orm.User(name='user')
  415.             self.db.add(user)
  416.             self.db.commit()
  417.             yield super(MockHub, self).start()
  418.             yield self.hub.server.wait_up(http=True)
  419.             self.io_loop.add_callback(evt.set)
  420.     
  421.         def _start():
  422.             self.io_loop = IOLoop()
  423.             self.io_loop.make_current()
  424.             self.io_loop.add_callback(_start_co)
  425.             self.io_loop.start()
  426.     
  427.         self._thread = threading.Thread(target=_start)
  428.         self._thread.start()
  429.         ready = evt.wait(timeout=10)
  430. >       assert ready
  431. E       AssertionError
  432.  
  433. jupyterhub/tests/mocking.py:178: AssertionError
  434. __________________________________________ ERROR at setup of test_add_multi_user_admin __________________________________________
  435.  
  436. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  437.  
  438.     @fixture(scope='module')
  439.     def app(request):
  440.         app = MockHub.instance(log_level=logging.DEBUG)
  441. >       app.start([])
  442.  
  443. jupyterhub/tests/conftest.py:55:
  444. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  445.  
  446. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  447.  
  448.     def start(self, argv=None):
  449.         self.db_file = NamedTemporaryFile()
  450.         self.pid_file = NamedTemporaryFile(delete=False).name
  451.         self.db_url = self.db_file.name
  452.     
  453.         evt = threading.Event()
  454.     
  455.         @gen.coroutine
  456.         def _start_co():
  457.             assert self.io_loop._running
  458.             # put initialize in start for SQLAlchemy threading reasons
  459.             yield super(MockHub, self).initialize(argv=argv)
  460.             # add an initial user
  461.             user = orm.User(name='user')
  462.             self.db.add(user)
  463.             self.db.commit()
  464.             yield super(MockHub, self).start()
  465.             yield self.hub.server.wait_up(http=True)
  466.             self.io_loop.add_callback(evt.set)
  467.     
  468.         def _start():
  469.             self.io_loop = IOLoop()
  470.             self.io_loop.make_current()
  471.             self.io_loop.add_callback(_start_co)
  472.             self.io_loop.start()
  473.     
  474.         self._thread = threading.Thread(target=_start)
  475.         self._thread.start()
  476.         ready = evt.wait(timeout=10)
  477. >       assert ready
  478. E       AssertionError
  479.  
  480. jupyterhub/tests/mocking.py:178: AssertionError
  481. ______________________________________________ ERROR at setup of test_add_user_bad ______________________________________________
  482.  
  483. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  484.  
  485.     @fixture(scope='module')
  486.     def app(request):
  487.         app = MockHub.instance(log_level=logging.DEBUG)
  488. >       app.start([])
  489.  
  490. jupyterhub/tests/conftest.py:55:
  491. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  492.  
  493. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  494.  
  495.     def start(self, argv=None):
  496.         self.db_file = NamedTemporaryFile()
  497.         self.pid_file = NamedTemporaryFile(delete=False).name
  498.         self.db_url = self.db_file.name
  499.     
  500.         evt = threading.Event()
  501.     
  502.         @gen.coroutine
  503.         def _start_co():
  504.             assert self.io_loop._running
  505.             # put initialize in start for SQLAlchemy threading reasons
  506.             yield super(MockHub, self).initialize(argv=argv)
  507.             # add an initial user
  508.             user = orm.User(name='user')
  509.             self.db.add(user)
  510.             self.db.commit()
  511.             yield super(MockHub, self).start()
  512.             yield self.hub.server.wait_up(http=True)
  513.             self.io_loop.add_callback(evt.set)
  514.     
  515.         def _start():
  516.             self.io_loop = IOLoop()
  517.             self.io_loop.make_current()
  518.             self.io_loop.add_callback(_start_co)
  519.             self.io_loop.start()
  520.     
  521.         self._thread = threading.Thread(target=_start)
  522.         self._thread.start()
  523.         ready = evt.wait(timeout=10)
  524. >       assert ready
  525. E       AssertionError
  526.  
  527. jupyterhub/tests/mocking.py:178: AssertionError
  528. _______________________________________________ ERROR at setup of test_add_admin ________________________________________________
  529.  
  530. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  531.  
  532.     @fixture(scope='module')
  533.     def app(request):
  534.         app = MockHub.instance(log_level=logging.DEBUG)
  535. >       app.start([])
  536.  
  537. jupyterhub/tests/conftest.py:55:
  538. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  539.  
  540. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  541.  
  542.     def start(self, argv=None):
  543.         self.db_file = NamedTemporaryFile()
  544.         self.pid_file = NamedTemporaryFile(delete=False).name
  545.         self.db_url = self.db_file.name
  546.     
  547.         evt = threading.Event()
  548.     
  549.         @gen.coroutine
  550.         def _start_co():
  551.             assert self.io_loop._running
  552.             # put initialize in start for SQLAlchemy threading reasons
  553.             yield super(MockHub, self).initialize(argv=argv)
  554.             # add an initial user
  555.             user = orm.User(name='user')
  556.             self.db.add(user)
  557.             self.db.commit()
  558.             yield super(MockHub, self).start()
  559.             yield self.hub.server.wait_up(http=True)
  560.             self.io_loop.add_callback(evt.set)
  561.     
  562.         def _start():
  563.             self.io_loop = IOLoop()
  564.             self.io_loop.make_current()
  565.             self.io_loop.add_callback(_start_co)
  566.             self.io_loop.start()
  567.     
  568.         self._thread = threading.Thread(target=_start)
  569.         self._thread.start()
  570.         ready = evt.wait(timeout=10)
  571. >       assert ready
  572. E       AssertionError
  573.  
  574. jupyterhub/tests/mocking.py:178: AssertionError
  575. ______________________________________________ ERROR at setup of test_delete_user _______________________________________________
  576.  
  577. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  578.  
  579.     @fixture(scope='module')
  580.     def app(request):
  581.         app = MockHub.instance(log_level=logging.DEBUG)
  582. >       app.start([])
  583.  
  584. jupyterhub/tests/conftest.py:55:
  585. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  586.  
  587. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  588.  
  589.     def start(self, argv=None):
  590.         self.db_file = NamedTemporaryFile()
  591.         self.pid_file = NamedTemporaryFile(delete=False).name
  592.         self.db_url = self.db_file.name
  593.     
  594.         evt = threading.Event()
  595.     
  596.         @gen.coroutine
  597.         def _start_co():
  598.             assert self.io_loop._running
  599.             # put initialize in start for SQLAlchemy threading reasons
  600.             yield super(MockHub, self).initialize(argv=argv)
  601.             # add an initial user
  602.             user = orm.User(name='user')
  603.             self.db.add(user)
  604.             self.db.commit()
  605.             yield super(MockHub, self).start()
  606.             yield self.hub.server.wait_up(http=True)
  607.             self.io_loop.add_callback(evt.set)
  608.     
  609.         def _start():
  610.             self.io_loop = IOLoop()
  611.             self.io_loop.make_current()
  612.             self.io_loop.add_callback(_start_co)
  613.             self.io_loop.start()
  614.     
  615.         self._thread = threading.Thread(target=_start)
  616.         self._thread.start()
  617.         ready = evt.wait(timeout=10)
  618. >       assert ready
  619. E       AssertionError
  620.  
  621. jupyterhub/tests/mocking.py:178: AssertionError
  622. _______________________________________________ ERROR at setup of test_make_admin _______________________________________________
  623.  
  624. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  625.  
  626.     @fixture(scope='module')
  627.     def app(request):
  628.         app = MockHub.instance(log_level=logging.DEBUG)
  629. >       app.start([])
  630.  
  631. jupyterhub/tests/conftest.py:55:
  632. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  633.  
  634. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  635.  
  636.     def start(self, argv=None):
  637.         self.db_file = NamedTemporaryFile()
  638.         self.pid_file = NamedTemporaryFile(delete=False).name
  639.         self.db_url = self.db_file.name
  640.     
  641.         evt = threading.Event()
  642.     
  643.         @gen.coroutine
  644.         def _start_co():
  645.             assert self.io_loop._running
  646.             # put initialize in start for SQLAlchemy threading reasons
  647.             yield super(MockHub, self).initialize(argv=argv)
  648.             # add an initial user
  649.             user = orm.User(name='user')
  650.             self.db.add(user)
  651.             self.db.commit()
  652.             yield super(MockHub, self).start()
  653.             yield self.hub.server.wait_up(http=True)
  654.             self.io_loop.add_callback(evt.set)
  655.     
  656.         def _start():
  657.             self.io_loop = IOLoop()
  658.             self.io_loop.make_current()
  659.             self.io_loop.add_callback(_start_co)
  660.             self.io_loop.start()
  661.     
  662.         self._thread = threading.Thread(target=_start)
  663.         self._thread.start()
  664.         ready = evt.wait(timeout=10)
  665. >       assert ready
  666. E       AssertionError
  667.  
  668. jupyterhub/tests/mocking.py:178: AssertionError
  669. _________________________________________________ ERROR at setup of test_spawn __________________________________________________
  670.  
  671. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  672.  
  673.     @fixture(scope='module')
  674.     def app(request):
  675.         app = MockHub.instance(log_level=logging.DEBUG)
  676. >       app.start([])
  677.  
  678. jupyterhub/tests/conftest.py:55:
  679. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  680.  
  681. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  682.  
  683.     def start(self, argv=None):
  684.         self.db_file = NamedTemporaryFile()
  685.         self.pid_file = NamedTemporaryFile(delete=False).name
  686.         self.db_url = self.db_file.name
  687.     
  688.         evt = threading.Event()
  689.     
  690.         @gen.coroutine
  691.         def _start_co():
  692.             assert self.io_loop._running
  693.             # put initialize in start for SQLAlchemy threading reasons
  694.             yield super(MockHub, self).initialize(argv=argv)
  695.             # add an initial user
  696.             user = orm.User(name='user')
  697.             self.db.add(user)
  698.             self.db.commit()
  699.             yield super(MockHub, self).start()
  700.             yield self.hub.server.wait_up(http=True)
  701.             self.io_loop.add_callback(evt.set)
  702.     
  703.         def _start():
  704.             self.io_loop = IOLoop()
  705.             self.io_loop.make_current()
  706.             self.io_loop.add_callback(_start_co)
  707.             self.io_loop.start()
  708.     
  709.         self._thread = threading.Thread(target=_start)
  710.         self._thread.start()
  711.         ready = evt.wait(timeout=10)
  712. >       assert ready
  713. E       AssertionError
  714.  
  715. jupyterhub/tests/mocking.py:178: AssertionError
  716. _______________________________________________ ERROR at setup of test_slow_spawn _______________________________________________
  717.  
  718. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  719.  
  720.     @fixture(scope='module')
  721.     def app(request):
  722.         app = MockHub.instance(log_level=logging.DEBUG)
  723. >       app.start([])
  724.  
  725. jupyterhub/tests/conftest.py:55:
  726. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  727.  
  728. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  729.  
  730.     def start(self, argv=None):
  731.         self.db_file = NamedTemporaryFile()
  732.         self.pid_file = NamedTemporaryFile(delete=False).name
  733.         self.db_url = self.db_file.name
  734.     
  735.         evt = threading.Event()
  736.     
  737.         @gen.coroutine
  738.         def _start_co():
  739.             assert self.io_loop._running
  740.             # put initialize in start for SQLAlchemy threading reasons
  741.             yield super(MockHub, self).initialize(argv=argv)
  742.             # add an initial user
  743.             user = orm.User(name='user')
  744.             self.db.add(user)
  745.             self.db.commit()
  746.             yield super(MockHub, self).start()
  747.             yield self.hub.server.wait_up(http=True)
  748.             self.io_loop.add_callback(evt.set)
  749.     
  750.         def _start():
  751.             self.io_loop = IOLoop()
  752.             self.io_loop.make_current()
  753.             self.io_loop.add_callback(_start_co)
  754.             self.io_loop.start()
  755.     
  756.         self._thread = threading.Thread(target=_start)
  757.         self._thread.start()
  758.         ready = evt.wait(timeout=10)
  759. >       assert ready
  760. E       AssertionError
  761.  
  762. jupyterhub/tests/mocking.py:178: AssertionError
  763. ______________________________________________ ERROR at setup of test_never_spawn _______________________________________________
  764.  
  765. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  766.  
  767.     @fixture(scope='module')
  768.     def app(request):
  769.         app = MockHub.instance(log_level=logging.DEBUG)
  770. >       app.start([])
  771.  
  772. jupyterhub/tests/conftest.py:55:
  773. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  774.  
  775. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  776.  
  777.     def start(self, argv=None):
  778.         self.db_file = NamedTemporaryFile()
  779.         self.pid_file = NamedTemporaryFile(delete=False).name
  780.         self.db_url = self.db_file.name
  781.     
  782.         evt = threading.Event()
  783.     
  784.         @gen.coroutine
  785.         def _start_co():
  786.             assert self.io_loop._running
  787.             # put initialize in start for SQLAlchemy threading reasons
  788.             yield super(MockHub, self).initialize(argv=argv)
  789.             # add an initial user
  790.             user = orm.User(name='user')
  791.             self.db.add(user)
  792.             self.db.commit()
  793.             yield super(MockHub, self).start()
  794.             yield self.hub.server.wait_up(http=True)
  795.             self.io_loop.add_callback(evt.set)
  796.     
  797.         def _start():
  798.             self.io_loop = IOLoop()
  799.             self.io_loop.make_current()
  800.             self.io_loop.add_callback(_start_co)
  801.             self.io_loop.start()
  802.     
  803.         self._thread = threading.Thread(target=_start)
  804.         self._thread.start()
  805.         ready = evt.wait(timeout=10)
  806. >       assert ready
  807. E       AssertionError
  808.  
  809. jupyterhub/tests/mocking.py:178: AssertionError
  810. _______________________________________________ ERROR at setup of test_get_proxy ________________________________________________
  811.  
  812. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  813.  
  814.     @fixture(scope='module')
  815.     def app(request):
  816.         app = MockHub.instance(log_level=logging.DEBUG)
  817. >       app.start([])
  818.  
  819. jupyterhub/tests/conftest.py:55:
  820. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  821.  
  822. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  823.  
  824.     def start(self, argv=None):
  825.         self.db_file = NamedTemporaryFile()
  826.         self.pid_file = NamedTemporaryFile(delete=False).name
  827.         self.db_url = self.db_file.name
  828.     
  829.         evt = threading.Event()
  830.     
  831.         @gen.coroutine
  832.         def _start_co():
  833.             assert self.io_loop._running
  834.             # put initialize in start for SQLAlchemy threading reasons
  835.             yield super(MockHub, self).initialize(argv=argv)
  836.             # add an initial user
  837.             user = orm.User(name='user')
  838.             self.db.add(user)
  839.             self.db.commit()
  840.             yield super(MockHub, self).start()
  841.             yield self.hub.server.wait_up(http=True)
  842.             self.io_loop.add_callback(evt.set)
  843.     
  844.         def _start():
  845.             self.io_loop = IOLoop()
  846.             self.io_loop.make_current()
  847.             self.io_loop.add_callback(_start_co)
  848.             self.io_loop.start()
  849.     
  850.         self._thread = threading.Thread(target=_start)
  851.         self._thread.start()
  852.         ready = evt.wait(timeout=10)
  853. >       assert ready
  854. E       AssertionError
  855.  
  856. jupyterhub/tests/mocking.py:178: AssertionError
  857. _________________________________________________ ERROR at setup of test_cookie _________________________________________________
  858.  
  859. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  860.  
  861.     @fixture(scope='module')
  862.     def app(request):
  863.         app = MockHub.instance(log_level=logging.DEBUG)
  864. >       app.start([])
  865.  
  866. jupyterhub/tests/conftest.py:55:
  867. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  868.  
  869. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  870.  
  871.     def start(self, argv=None):
  872.         self.db_file = NamedTemporaryFile()
  873.         self.pid_file = NamedTemporaryFile(delete=False).name
  874.         self.db_url = self.db_file.name
  875.     
  876.         evt = threading.Event()
  877.     
  878.         @gen.coroutine
  879.         def _start_co():
  880.             assert self.io_loop._running
  881.             # put initialize in start for SQLAlchemy threading reasons
  882.             yield super(MockHub, self).initialize(argv=argv)
  883.             # add an initial user
  884.             user = orm.User(name='user')
  885.             self.db.add(user)
  886.             self.db.commit()
  887.             yield super(MockHub, self).start()
  888.             yield self.hub.server.wait_up(http=True)
  889.             self.io_loop.add_callback(evt.set)
  890.     
  891.         def _start():
  892.             self.io_loop = IOLoop()
  893.             self.io_loop.make_current()
  894.             self.io_loop.add_callback(_start_co)
  895.             self.io_loop.start()
  896.     
  897.         self._thread = threading.Thread(target=_start)
  898.         self._thread.start()
  899.         ready = evt.wait(timeout=10)
  900. >       assert ready
  901. E       AssertionError
  902.  
  903. jupyterhub/tests/mocking.py:178: AssertionError
  904. _________________________________________________ ERROR at setup of test_token __________________________________________________
  905.  
  906. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  907.  
  908.     @fixture(scope='module')
  909.     def app(request):
  910.         app = MockHub.instance(log_level=logging.DEBUG)
  911. >       app.start([])
  912.  
  913. jupyterhub/tests/conftest.py:55:
  914. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  915.  
  916. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  917.  
  918.     def start(self, argv=None):
  919.         self.db_file = NamedTemporaryFile()
  920.         self.pid_file = NamedTemporaryFile(delete=False).name
  921.         self.db_url = self.db_file.name
  922.     
  923.         evt = threading.Event()
  924.     
  925.         @gen.coroutine
  926.         def _start_co():
  927.             assert self.io_loop._running
  928.             # put initialize in start for SQLAlchemy threading reasons
  929.             yield super(MockHub, self).initialize(argv=argv)
  930.             # add an initial user
  931.             user = orm.User(name='user')
  932.             self.db.add(user)
  933.             self.db.commit()
  934.             yield super(MockHub, self).start()
  935.             yield self.hub.server.wait_up(http=True)
  936.             self.io_loop.add_callback(evt.set)
  937.     
  938.         def _start():
  939.             self.io_loop = IOLoop()
  940.             self.io_loop.make_current()
  941.             self.io_loop.add_callback(_start_co)
  942.             self.io_loop.start()
  943.     
  944.         self._thread = threading.Thread(target=_start)
  945.         self._thread.start()
  946.         ready = evt.wait(timeout=10)
  947. >       assert ready
  948. E       AssertionError
  949.  
  950. jupyterhub/tests/mocking.py:178: AssertionError
  951. _______________________________________________ ERROR at setup of test_get_token ________________________________________________
  952.  
  953. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  954.  
  955.     @fixture(scope='module')
  956.     def app(request):
  957.         app = MockHub.instance(log_level=logging.DEBUG)
  958. >       app.start([])
  959.  
  960. jupyterhub/tests/conftest.py:55:
  961. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  962.  
  963. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  964.  
  965.     def start(self, argv=None):
  966.         self.db_file = NamedTemporaryFile()
  967.         self.pid_file = NamedTemporaryFile(delete=False).name
  968.         self.db_url = self.db_file.name
  969.     
  970.         evt = threading.Event()
  971.     
  972.         @gen.coroutine
  973.         def _start_co():
  974.             assert self.io_loop._running
  975.             # put initialize in start for SQLAlchemy threading reasons
  976.             yield super(MockHub, self).initialize(argv=argv)
  977.             # add an initial user
  978.             user = orm.User(name='user')
  979.             self.db.add(user)
  980.             self.db.commit()
  981.             yield super(MockHub, self).start()
  982.             yield self.hub.server.wait_up(http=True)
  983.             self.io_loop.add_callback(evt.set)
  984.     
  985.         def _start():
  986.             self.io_loop = IOLoop()
  987.             self.io_loop.make_current()
  988.             self.io_loop.add_callback(_start_co)
  989.             self.io_loop.start()
  990.     
  991.         self._thread = threading.Thread(target=_start)
  992.         self._thread.start()
  993.         ready = evt.wait(timeout=10)
  994. >       assert ready
  995. E       AssertionError
  996.  
  997. jupyterhub/tests/mocking.py:178: AssertionError
  998. _____________________________________________ ERROR at setup of test_bad_get_token ______________________________________________
  999.  
  1000. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  1001.  
  1002.     @fixture(scope='module')
  1003.     def app(request):
  1004.         app = MockHub.instance(log_level=logging.DEBUG)
  1005. >       app.start([])
  1006.  
  1007. jupyterhub/tests/conftest.py:55:
  1008. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1009.  
  1010. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  1011.  
  1012.     def start(self, argv=None):
  1013.         self.db_file = NamedTemporaryFile()
  1014.         self.pid_file = NamedTemporaryFile(delete=False).name
  1015.         self.db_url = self.db_file.name
  1016.     
  1017.         evt = threading.Event()
  1018.     
  1019.         @gen.coroutine
  1020.         def _start_co():
  1021.             assert self.io_loop._running
  1022.             # put initialize in start for SQLAlchemy threading reasons
  1023.             yield super(MockHub, self).initialize(argv=argv)
  1024.             # add an initial user
  1025.             user = orm.User(name='user')
  1026.             self.db.add(user)
  1027.             self.db.commit()
  1028.             yield super(MockHub, self).start()
  1029.             yield self.hub.server.wait_up(http=True)
  1030.             self.io_loop.add_callback(evt.set)
  1031.     
  1032.         def _start():
  1033.             self.io_loop = IOLoop()
  1034.             self.io_loop.make_current()
  1035.             self.io_loop.add_callback(_start_co)
  1036.             self.io_loop.start()
  1037.     
  1038.         self._thread = threading.Thread(target=_start)
  1039.         self._thread.start()
  1040.         ready = evt.wait(timeout=10)
  1041. >       assert ready
  1042. E       AssertionError
  1043.  
  1044. jupyterhub/tests/mocking.py:178: AssertionError
  1045. ______________________________________________ ERROR at setup of test_groups_list _______________________________________________
  1046.  
  1047. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  1048.  
  1049.     @fixture(scope='module')
  1050.     def app(request):
  1051.         app = MockHub.instance(log_level=logging.DEBUG)
  1052. >       app.start([])
  1053.  
  1054. jupyterhub/tests/conftest.py:55:
  1055. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1056.  
  1057. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  1058.  
  1059.     def start(self, argv=None):
  1060.         self.db_file = NamedTemporaryFile()
  1061.         self.pid_file = NamedTemporaryFile(delete=False).name
  1062.         self.db_url = self.db_file.name
  1063.     
  1064.         evt = threading.Event()
  1065.     
  1066.         @gen.coroutine
  1067.         def _start_co():
  1068.             assert self.io_loop._running
  1069.             # put initialize in start for SQLAlchemy threading reasons
  1070.             yield super(MockHub, self).initialize(argv=argv)
  1071.             # add an initial user
  1072.             user = orm.User(name='user')
  1073.             self.db.add(user)
  1074.             self.db.commit()
  1075.             yield super(MockHub, self).start()
  1076.             yield self.hub.server.wait_up(http=True)
  1077.             self.io_loop.add_callback(evt.set)
  1078.     
  1079.         def _start():
  1080.             self.io_loop = IOLoop()
  1081.             self.io_loop.make_current()
  1082.             self.io_loop.add_callback(_start_co)
  1083.             self.io_loop.start()
  1084.     
  1085.         self._thread = threading.Thread(target=_start)
  1086.         self._thread.start()
  1087.         ready = evt.wait(timeout=10)
  1088. >       assert ready
  1089. E       AssertionError
  1090.  
  1091. jupyterhub/tests/mocking.py:178: AssertionError
  1092. _______________________________________________ ERROR at setup of test_group_get ________________________________________________
  1093.  
  1094. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  1095.  
  1096.     @fixture(scope='module')
  1097.     def app(request):
  1098.         app = MockHub.instance(log_level=logging.DEBUG)
  1099. >       app.start([])
  1100.  
  1101. jupyterhub/tests/conftest.py:55:
  1102. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1103.  
  1104. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  1105.  
  1106.     def start(self, argv=None):
  1107.         self.db_file = NamedTemporaryFile()
  1108.         self.pid_file = NamedTemporaryFile(delete=False).name
  1109.         self.db_url = self.db_file.name
  1110.     
  1111.         evt = threading.Event()
  1112.     
  1113.         @gen.coroutine
  1114.         def _start_co():
  1115.             assert self.io_loop._running
  1116.             # put initialize in start for SQLAlchemy threading reasons
  1117.             yield super(MockHub, self).initialize(argv=argv)
  1118.             # add an initial user
  1119.             user = orm.User(name='user')
  1120.             self.db.add(user)
  1121.             self.db.commit()
  1122.             yield super(MockHub, self).start()
  1123.             yield self.hub.server.wait_up(http=True)
  1124.             self.io_loop.add_callback(evt.set)
  1125.     
  1126.         def _start():
  1127.             self.io_loop = IOLoop()
  1128.             self.io_loop.make_current()
  1129.             self.io_loop.add_callback(_start_co)
  1130.             self.io_loop.start()
  1131.     
  1132.         self._thread = threading.Thread(target=_start)
  1133.         self._thread.start()
  1134.         ready = evt.wait(timeout=10)
  1135. >       assert ready
  1136. E       AssertionError
  1137.  
  1138. jupyterhub/tests/mocking.py:178: AssertionError
  1139. __________________________________________ ERROR at setup of test_group_create_delete ___________________________________________
  1140.  
  1141. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  1142.  
  1143.     @fixture(scope='module')
  1144.     def app(request):
  1145.         app = MockHub.instance(log_level=logging.DEBUG)
  1146. >       app.start([])
  1147.  
  1148. jupyterhub/tests/conftest.py:55:
  1149. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1150.  
  1151. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  1152.  
  1153.     def start(self, argv=None):
  1154.         self.db_file = NamedTemporaryFile()
  1155.         self.pid_file = NamedTemporaryFile(delete=False).name
  1156.         self.db_url = self.db_file.name
  1157.     
  1158.         evt = threading.Event()
  1159.     
  1160.         @gen.coroutine
  1161.         def _start_co():
  1162.             assert self.io_loop._running
  1163.             # put initialize in start for SQLAlchemy threading reasons
  1164.             yield super(MockHub, self).initialize(argv=argv)
  1165.             # add an initial user
  1166.             user = orm.User(name='user')
  1167.             self.db.add(user)
  1168.             self.db.commit()
  1169.             yield super(MockHub, self).start()
  1170.             yield self.hub.server.wait_up(http=True)
  1171.             self.io_loop.add_callback(evt.set)
  1172.     
  1173.         def _start():
  1174.             self.io_loop = IOLoop()
  1175.             self.io_loop.make_current()
  1176.             self.io_loop.add_callback(_start_co)
  1177.             self.io_loop.start()
  1178.     
  1179.         self._thread = threading.Thread(target=_start)
  1180.         self._thread.start()
  1181.         ready = evt.wait(timeout=10)
  1182. >       assert ready
  1183. E       AssertionError
  1184.  
  1185. jupyterhub/tests/mocking.py:178: AssertionError
  1186. ____________________________________________ ERROR at setup of test_group_add_users _____________________________________________
  1187.  
  1188. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  1189.  
  1190.     @fixture(scope='module')
  1191.     def app(request):
  1192.         app = MockHub.instance(log_level=logging.DEBUG)
  1193. >       app.start([])
  1194.  
  1195. jupyterhub/tests/conftest.py:55:
  1196. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1197.  
  1198. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  1199.  
  1200.     def start(self, argv=None):
  1201.         self.db_file = NamedTemporaryFile()
  1202.         self.pid_file = NamedTemporaryFile(delete=False).name
  1203.         self.db_url = self.db_file.name
  1204.     
  1205.         evt = threading.Event()
  1206.     
  1207.         @gen.coroutine
  1208.         def _start_co():
  1209.             assert self.io_loop._running
  1210.             # put initialize in start for SQLAlchemy threading reasons
  1211.             yield super(MockHub, self).initialize(argv=argv)
  1212.             # add an initial user
  1213.             user = orm.User(name='user')
  1214.             self.db.add(user)
  1215.             self.db.commit()
  1216.             yield super(MockHub, self).start()
  1217.             yield self.hub.server.wait_up(http=True)
  1218.             self.io_loop.add_callback(evt.set)
  1219.     
  1220.         def _start():
  1221.             self.io_loop = IOLoop()
  1222.             self.io_loop.make_current()
  1223.             self.io_loop.add_callback(_start_co)
  1224.             self.io_loop.start()
  1225.     
  1226.         self._thread = threading.Thread(target=_start)
  1227.         self._thread.start()
  1228.         ready = evt.wait(timeout=10)
  1229. >       assert ready
  1230. E       AssertionError
  1231.  
  1232. jupyterhub/tests/mocking.py:178: AssertionError
  1233. ___________________________________________ ERROR at setup of test_group_delete_users ___________________________________________
  1234.  
  1235. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  1236.  
  1237.     @fixture(scope='module')
  1238.     def app(request):
  1239.         app = MockHub.instance(log_level=logging.DEBUG)
  1240. >       app.start([])
  1241.  
  1242. jupyterhub/tests/conftest.py:55:
  1243. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1244.  
  1245. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  1246.  
  1247.     def start(self, argv=None):
  1248.         self.db_file = NamedTemporaryFile()
  1249.         self.pid_file = NamedTemporaryFile(delete=False).name
  1250.         self.db_url = self.db_file.name
  1251.     
  1252.         evt = threading.Event()
  1253.     
  1254.         @gen.coroutine
  1255.         def _start_co():
  1256.             assert self.io_loop._running
  1257.             # put initialize in start for SQLAlchemy threading reasons
  1258.             yield super(MockHub, self).initialize(argv=argv)
  1259.             # add an initial user
  1260.             user = orm.User(name='user')
  1261.             self.db.add(user)
  1262.             self.db.commit()
  1263.             yield super(MockHub, self).start()
  1264.             yield self.hub.server.wait_up(http=True)
  1265.             self.io_loop.add_callback(evt.set)
  1266.     
  1267.         def _start():
  1268.             self.io_loop = IOLoop()
  1269.             self.io_loop.make_current()
  1270.             self.io_loop.add_callback(_start_co)
  1271.             self.io_loop.start()
  1272.     
  1273.         self._thread = threading.Thread(target=_start)
  1274.         self._thread.start()
  1275.         ready = evt.wait(timeout=10)
  1276. >       assert ready
  1277. E       AssertionError
  1278.  
  1279. jupyterhub/tests/mocking.py:178: AssertionError
  1280. ______________________________________________ ERROR at setup of test_get_services ______________________________________________
  1281.  
  1282. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  1283.  
  1284.     @fixture(scope='module')
  1285.     def app(request):
  1286.         app = MockHub.instance(log_level=logging.DEBUG)
  1287. >       app.start([])
  1288.  
  1289. jupyterhub/tests/conftest.py:55:
  1290. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1291.  
  1292. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  1293.  
  1294.     def start(self, argv=None):
  1295.         self.db_file = NamedTemporaryFile()
  1296.         self.pid_file = NamedTemporaryFile(delete=False).name
  1297.         self.db_url = self.db_file.name
  1298.     
  1299.         evt = threading.Event()
  1300.     
  1301.         @gen.coroutine
  1302.         def _start_co():
  1303.             assert self.io_loop._running
  1304.             # put initialize in start for SQLAlchemy threading reasons
  1305.             yield super(MockHub, self).initialize(argv=argv)
  1306.             # add an initial user
  1307.             user = orm.User(name='user')
  1308.             self.db.add(user)
  1309.             self.db.commit()
  1310.             yield super(MockHub, self).start()
  1311.             yield self.hub.server.wait_up(http=True)
  1312.             self.io_loop.add_callback(evt.set)
  1313.     
  1314.         def _start():
  1315.             self.io_loop = IOLoop()
  1316.             self.io_loop.make_current()
  1317.             self.io_loop.add_callback(_start_co)
  1318.             self.io_loop.start()
  1319.     
  1320.         self._thread = threading.Thread(target=_start)
  1321.         self._thread.start()
  1322.         ready = evt.wait(timeout=10)
  1323. >       assert ready
  1324. E       AssertionError
  1325.  
  1326. jupyterhub/tests/mocking.py:178: AssertionError
  1327. ______________________________________________ ERROR at setup of test_get_service _______________________________________________
  1328.  
  1329. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  1330.  
  1331.     @fixture(scope='module')
  1332.     def app(request):
  1333.         app = MockHub.instance(log_level=logging.DEBUG)
  1334. >       app.start([])
  1335.  
  1336. jupyterhub/tests/conftest.py:55:
  1337. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1338.  
  1339. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  1340.  
  1341.     def start(self, argv=None):
  1342.         self.db_file = NamedTemporaryFile()
  1343.         self.pid_file = NamedTemporaryFile(delete=False).name
  1344.         self.db_url = self.db_file.name
  1345.     
  1346.         evt = threading.Event()
  1347.     
  1348.         @gen.coroutine
  1349.         def _start_co():
  1350.             assert self.io_loop._running
  1351.             # put initialize in start for SQLAlchemy threading reasons
  1352.             yield super(MockHub, self).initialize(argv=argv)
  1353.             # add an initial user
  1354.             user = orm.User(name='user')
  1355.             self.db.add(user)
  1356.             self.db.commit()
  1357.             yield super(MockHub, self).start()
  1358.             yield self.hub.server.wait_up(http=True)
  1359.             self.io_loop.add_callback(evt.set)
  1360.     
  1361.         def _start():
  1362.             self.io_loop = IOLoop()
  1363.             self.io_loop.make_current()
  1364.             self.io_loop.add_callback(_start_co)
  1365.             self.io_loop.start()
  1366.     
  1367.         self._thread = threading.Thread(target=_start)
  1368.         self._thread.start()
  1369.         ready = evt.wait(timeout=10)
  1370. >       assert ready
  1371. E       AssertionError
  1372.  
  1373. jupyterhub/tests/mocking.py:178: AssertionError
  1374. ________________________________________________ ERROR at setup of test_root_api ________________________________________________
  1375.  
  1376. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  1377.  
  1378.     @fixture(scope='module')
  1379.     def app(request):
  1380.         app = MockHub.instance(log_level=logging.DEBUG)
  1381. >       app.start([])
  1382.  
  1383. jupyterhub/tests/conftest.py:55:
  1384. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1385.  
  1386. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  1387.  
  1388.     def start(self, argv=None):
  1389.         self.db_file = NamedTemporaryFile()
  1390.         self.pid_file = NamedTemporaryFile(delete=False).name
  1391.         self.db_url = self.db_file.name
  1392.     
  1393.         evt = threading.Event()
  1394.     
  1395.         @gen.coroutine
  1396.         def _start_co():
  1397.             assert self.io_loop._running
  1398.             # put initialize in start for SQLAlchemy threading reasons
  1399.             yield super(MockHub, self).initialize(argv=argv)
  1400.             # add an initial user
  1401.             user = orm.User(name='user')
  1402.             self.db.add(user)
  1403.             self.db.commit()
  1404.             yield super(MockHub, self).start()
  1405.             yield self.hub.server.wait_up(http=True)
  1406.             self.io_loop.add_callback(evt.set)
  1407.     
  1408.         def _start():
  1409.             self.io_loop = IOLoop()
  1410.             self.io_loop.make_current()
  1411.             self.io_loop.add_callback(_start_co)
  1412.             self.io_loop.start()
  1413.     
  1414.         self._thread = threading.Thread(target=_start)
  1415.         self._thread.start()
  1416.         ready = evt.wait(timeout=10)
  1417. >       assert ready
  1418. E       AssertionError
  1419.  
  1420. jupyterhub/tests/mocking.py:178: AssertionError
  1421. __________________________________________________ ERROR at setup of test_info __________________________________________________
  1422.  
  1423. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  1424.  
  1425.     @fixture(scope='module')
  1426.     def app(request):
  1427.         app = MockHub.instance(log_level=logging.DEBUG)
  1428. >       app.start([])
  1429.  
  1430. jupyterhub/tests/conftest.py:55:
  1431. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1432.  
  1433. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  1434.  
  1435.     def start(self, argv=None):
  1436.         self.db_file = NamedTemporaryFile()
  1437.         self.pid_file = NamedTemporaryFile(delete=False).name
  1438.         self.db_url = self.db_file.name
  1439.     
  1440.         evt = threading.Event()
  1441.     
  1442.         @gen.coroutine
  1443.         def _start_co():
  1444.             assert self.io_loop._running
  1445.             # put initialize in start for SQLAlchemy threading reasons
  1446.             yield super(MockHub, self).initialize(argv=argv)
  1447.             # add an initial user
  1448.             user = orm.User(name='user')
  1449.             self.db.add(user)
  1450.             self.db.commit()
  1451.             yield super(MockHub, self).start()
  1452.             yield self.hub.server.wait_up(http=True)
  1453.             self.io_loop.add_callback(evt.set)
  1454.     
  1455.         def _start():
  1456.             self.io_loop = IOLoop()
  1457.             self.io_loop.make_current()
  1458.             self.io_loop.add_callback(_start_co)
  1459.             self.io_loop.start()
  1460.     
  1461.         self._thread = threading.Thread(target=_start)
  1462.         self._thread.start()
  1463.         ready = evt.wait(timeout=10)
  1464. >       assert ready
  1465. E       AssertionError
  1466.  
  1467. jupyterhub/tests/mocking.py:178: AssertionError
  1468. ________________________________________________ ERROR at setup of test_options _________________________________________________
  1469.  
  1470. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  1471.  
  1472.     @fixture(scope='module')
  1473.     def app(request):
  1474.         app = MockHub.instance(log_level=logging.DEBUG)
  1475. >       app.start([])
  1476.  
  1477. jupyterhub/tests/conftest.py:55:
  1478. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1479.  
  1480. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  1481.  
  1482.     def start(self, argv=None):
  1483.         self.db_file = NamedTemporaryFile()
  1484.         self.pid_file = NamedTemporaryFile(delete=False).name
  1485.         self.db_url = self.db_file.name
  1486.     
  1487.         evt = threading.Event()
  1488.     
  1489.         @gen.coroutine
  1490.         def _start_co():
  1491.             assert self.io_loop._running
  1492.             # put initialize in start for SQLAlchemy threading reasons
  1493.             yield super(MockHub, self).initialize(argv=argv)
  1494.             # add an initial user
  1495.             user = orm.User(name='user')
  1496.             self.db.add(user)
  1497.             self.db.commit()
  1498.             yield super(MockHub, self).start()
  1499.             yield self.hub.server.wait_up(http=True)
  1500.             self.io_loop.add_callback(evt.set)
  1501.     
  1502.         def _start():
  1503.             self.io_loop = IOLoop()
  1504.             self.io_loop.make_current()
  1505.             self.io_loop.add_callback(_start_co)
  1506.             self.io_loop.start()
  1507.     
  1508.         self._thread = threading.Thread(target=_start)
  1509.         self._thread.start()
  1510.         ready = evt.wait(timeout=10)
  1511. >       assert ready
  1512. E       AssertionError
  1513.  
  1514. jupyterhub/tests/mocking.py:178: AssertionError
  1515. _____________________________________________ ERROR at setup of test_bad_json_body ______________________________________________
  1516.  
  1517. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  1518.  
  1519.     @fixture(scope='module')
  1520.     def app(request):
  1521.         app = MockHub.instance(log_level=logging.DEBUG)
  1522. >       app.start([])
  1523.  
  1524. jupyterhub/tests/conftest.py:55:
  1525. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1526.  
  1527. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  1528.  
  1529.     def start(self, argv=None):
  1530.         self.db_file = NamedTemporaryFile()
  1531.         self.pid_file = NamedTemporaryFile(delete=False).name
  1532.         self.db_url = self.db_file.name
  1533.     
  1534.         evt = threading.Event()
  1535.     
  1536.         @gen.coroutine
  1537.         def _start_co():
  1538.             assert self.io_loop._running
  1539.             # put initialize in start for SQLAlchemy threading reasons
  1540.             yield super(MockHub, self).initialize(argv=argv)
  1541.             # add an initial user
  1542.             user = orm.User(name='user')
  1543.             self.db.add(user)
  1544.             self.db.commit()
  1545.             yield super(MockHub, self).start()
  1546.             yield self.hub.server.wait_up(http=True)
  1547.             self.io_loop.add_callback(evt.set)
  1548.     
  1549.         def _start():
  1550.             self.io_loop = IOLoop()
  1551.             self.io_loop.make_current()
  1552.             self.io_loop.add_callback(_start_co)
  1553.             self.io_loop.start()
  1554.     
  1555.         self._thread = threading.Thread(target=_start)
  1556.         self._thread.start()
  1557.         ready = evt.wait(timeout=10)
  1558. >       assert ready
  1559. E       AssertionError
  1560.  
  1561. jupyterhub/tests/mocking.py:178: AssertionError
  1562. ________________________________________________ ERROR at setup of test_shutdown ________________________________________________
  1563.  
  1564. request = <SubRequest 'app' for <Function 'test_auth_api'>>
  1565.  
  1566.     @fixture(scope='module')
  1567.     def app(request):
  1568.         app = MockHub.instance(log_level=logging.DEBUG)
  1569. >       app.start([])
  1570.  
  1571. jupyterhub/tests/conftest.py:55:
  1572. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1573.  
  1574. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  1575.  
  1576.     def start(self, argv=None):
  1577.         self.db_file = NamedTemporaryFile()
  1578.         self.pid_file = NamedTemporaryFile(delete=False).name
  1579.         self.db_url = self.db_file.name
  1580.     
  1581.         evt = threading.Event()
  1582.     
  1583.         @gen.coroutine
  1584.         def _start_co():
  1585.             assert self.io_loop._running
  1586.             # put initialize in start for SQLAlchemy threading reasons
  1587.             yield super(MockHub, self).initialize(argv=argv)
  1588.             # add an initial user
  1589.             user = orm.User(name='user')
  1590.             self.db.add(user)
  1591.             self.db.commit()
  1592.             yield super(MockHub, self).start()
  1593.             yield self.hub.server.wait_up(http=True)
  1594.             self.io_loop.add_callback(evt.set)
  1595.     
  1596.         def _start():
  1597.             self.io_loop = IOLoop()
  1598.             self.io_loop.make_current()
  1599.             self.io_loop.add_callback(_start_co)
  1600.             self.io_loop.start()
  1601.     
  1602.         self._thread = threading.Thread(target=_start)
  1603.         self._thread.start()
  1604.         ready = evt.wait(timeout=10)
  1605. >       assert ready
  1606. E       AssertionError
  1607.  
  1608. jupyterhub/tests/mocking.py:178: AssertionError
  1609. ________________________________________________ ERROR at setup of test_handlers ________________________________________________
  1610.  
  1611. request = <SubRequest 'app' for <Function 'test_handlers'>>
  1612.  
  1613.     @fixture(scope='module')
  1614.     def app(request):
  1615.         app = MockHub.instance(log_level=logging.DEBUG)
  1616. >       app.start([])
  1617.  
  1618. jupyterhub/tests/conftest.py:55:
  1619. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1620.  
  1621. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  1622.  
  1623.     def start(self, argv=None):
  1624.         self.db_file = NamedTemporaryFile()
  1625.         self.pid_file = NamedTemporaryFile(delete=False).name
  1626.         self.db_url = self.db_file.name
  1627.     
  1628.         evt = threading.Event()
  1629.     
  1630.         @gen.coroutine
  1631.         def _start_co():
  1632.             assert self.io_loop._running
  1633.             # put initialize in start for SQLAlchemy threading reasons
  1634.             yield super(MockHub, self).initialize(argv=argv)
  1635.             # add an initial user
  1636.             user = orm.User(name='user')
  1637.             self.db.add(user)
  1638.             self.db.commit()
  1639.             yield super(MockHub, self).start()
  1640.             yield self.hub.server.wait_up(http=True)
  1641.             self.io_loop.add_callback(evt.set)
  1642.     
  1643.         def _start():
  1644.             self.io_loop = IOLoop()
  1645.             self.io_loop.make_current()
  1646.             self.io_loop.add_callback(_start_co)
  1647.             self.io_loop.start()
  1648.     
  1649.         self._thread = threading.Thread(target=_start)
  1650.         self._thread.start()
  1651.         ready = evt.wait(timeout=10)
  1652. >       assert ready
  1653. E       AssertionError
  1654.  
  1655. jupyterhub/tests/mocking.py:178: AssertionError
  1656. ----------------------------------------------------- Captured stderr setup -----------------------------------------------------
  1657. [I 2016-11-15 10:13:16.546 MockHub app:892] Not using whitelist. Any authenticated user will be allowed.
  1658. [E 2016-11-15 10:13:16.560 MockHub app:1447] Failed to bind hub to http://127.0.0.1:8081/@/space%20word/hub/
  1659. [E 2016-11-15 10:13:16.561 MockHub ioloop:633] Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x107318378>, <tornado.concurrent.Future object at 0x10668c240>)
  1660.    Traceback (most recent call last):
  1661.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/ioloop.py", line 604, in _run_callback
  1662.        ret = callback()
  1663.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/stack_context.py", line 275, in null_wrapper
  1664.        return fn(*args, **kwargs)
  1665.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/ioloop.py", line 619, in <lambda>
  1666.        self.add_future(ret, lambda f: f.result())
  1667.      File "/Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py", line 165, in _start_co
  1668.        yield super(MockHub, self).start()
  1669.      File "/Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/app.py", line 1445, in start
  1670.        self.http_server.listen(self.hub_port, address=self.hub_ip)
  1671.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/tcpserver.py", line 126, in listen
  1672.        sockets = bind_sockets(port, address=address)
  1673.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/netutil.py", line 194, in bind_sockets
  1674.        sock.bind(sockaddr)
  1675.    OSError: [Errno 48] Address already in use
  1676.    
  1677. ______________________________________________ ERROR at setup of test_root_no_auth ______________________________________________
  1678.  
  1679. request = <SubRequest 'app' for <Function 'test_root_no_auth'>>
  1680.  
  1681.     @fixture(scope='module')
  1682.     def app(request):
  1683.         app = MockHub.instance(log_level=logging.DEBUG)
  1684. >       app.start([])
  1685.  
  1686. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  1687. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1688.  
  1689. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  1690.  
  1691.     def start(self, argv=None):
  1692.         self.db_file = NamedTemporaryFile()
  1693.         self.pid_file = NamedTemporaryFile(delete=False).name
  1694.         self.db_url = self.db_file.name
  1695.     
  1696.         evt = threading.Event()
  1697.     
  1698.         @gen.coroutine
  1699.         def _start_co():
  1700.             assert self.io_loop._running
  1701.             # put initialize in start for SQLAlchemy threading reasons
  1702.             yield super(MockHub, self).initialize(argv=argv)
  1703.             # add an initial user
  1704.             user = orm.User(name='user')
  1705.             self.db.add(user)
  1706.             self.db.commit()
  1707.             yield super(MockHub, self).start()
  1708.             yield self.hub.server.wait_up(http=True)
  1709.             self.io_loop.add_callback(evt.set)
  1710.     
  1711.         def _start():
  1712.             self.io_loop = IOLoop()
  1713.             self.io_loop.make_current()
  1714.             self.io_loop.add_callback(_start_co)
  1715.             self.io_loop.start()
  1716.     
  1717.         self._thread = threading.Thread(target=_start)
  1718.         self._thread.start()
  1719.         ready = evt.wait(timeout=10)
  1720. >       assert ready
  1721. E       AssertionError
  1722.  
  1723. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  1724. ----------------------------------------------------- Captured stderr setup -----------------------------------------------------
  1725. [I 2016-11-15 10:13:28.174 MockHub app:892] Not using whitelist. Any authenticated user will be allowed.
  1726. [E 2016-11-15 10:13:28.190 MockHub app:1447] Failed to bind hub to http://127.0.0.1:8081/@/space%20word/hub/
  1727. [E 2016-11-15 10:13:28.190 MockHub ioloop:633] Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x1073b77b8>, <tornado.concurrent.Future object at 0x1071b6630>)
  1728.    Traceback (most recent call last):
  1729.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/ioloop.py", line 604, in _run_callback
  1730.        ret = callback()
  1731.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/stack_context.py", line 275, in null_wrapper
  1732.        return fn(*args, **kwargs)
  1733.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/ioloop.py", line 619, in <lambda>
  1734.        self.add_future(ret, lambda f: f.result())
  1735.      File "/Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py", line 165, in _start_co
  1736.        yield super(MockHub, self).start()
  1737.      File "/Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/app.py", line 1445, in start
  1738.        self.http_server.listen(self.hub_port, address=self.hub_ip)
  1739.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/tcpserver.py", line 126, in listen
  1740.        sockets = bind_sockets(port, address=address)
  1741.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/netutil.py", line 194, in bind_sockets
  1742.        sock.bind(sockaddr)
  1743.    OSError: [Errno 48] Address already in use
  1744.    
  1745. _______________________________________________ ERROR at setup of test_root_auth ________________________________________________
  1746.  
  1747. request = <SubRequest 'app' for <Function 'test_root_no_auth'>>
  1748.  
  1749.     @fixture(scope='module')
  1750.     def app(request):
  1751.         app = MockHub.instance(log_level=logging.DEBUG)
  1752. >       app.start([])
  1753.  
  1754. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  1755. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1756.  
  1757. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  1758.  
  1759.     def start(self, argv=None):
  1760.         self.db_file = NamedTemporaryFile()
  1761.         self.pid_file = NamedTemporaryFile(delete=False).name
  1762.         self.db_url = self.db_file.name
  1763.     
  1764.         evt = threading.Event()
  1765.     
  1766.         @gen.coroutine
  1767.         def _start_co():
  1768.             assert self.io_loop._running
  1769.             # put initialize in start for SQLAlchemy threading reasons
  1770.             yield super(MockHub, self).initialize(argv=argv)
  1771.             # add an initial user
  1772.             user = orm.User(name='user')
  1773.             self.db.add(user)
  1774.             self.db.commit()
  1775.             yield super(MockHub, self).start()
  1776.             yield self.hub.server.wait_up(http=True)
  1777.             self.io_loop.add_callback(evt.set)
  1778.     
  1779.         def _start():
  1780.             self.io_loop = IOLoop()
  1781.             self.io_loop.make_current()
  1782.             self.io_loop.add_callback(_start_co)
  1783.             self.io_loop.start()
  1784.     
  1785.         self._thread = threading.Thread(target=_start)
  1786.         self._thread.start()
  1787.         ready = evt.wait(timeout=10)
  1788. >       assert ready
  1789. E       AssertionError
  1790.  
  1791. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  1792. _____________________________________________ ERROR at setup of test_root_redirect ______________________________________________
  1793.  
  1794. request = <SubRequest 'app' for <Function 'test_root_no_auth'>>
  1795.  
  1796.     @fixture(scope='module')
  1797.     def app(request):
  1798.         app = MockHub.instance(log_level=logging.DEBUG)
  1799. >       app.start([])
  1800.  
  1801. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  1802. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1803.  
  1804. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  1805.  
  1806.     def start(self, argv=None):
  1807.         self.db_file = NamedTemporaryFile()
  1808.         self.pid_file = NamedTemporaryFile(delete=False).name
  1809.         self.db_url = self.db_file.name
  1810.     
  1811.         evt = threading.Event()
  1812.     
  1813.         @gen.coroutine
  1814.         def _start_co():
  1815.             assert self.io_loop._running
  1816.             # put initialize in start for SQLAlchemy threading reasons
  1817.             yield super(MockHub, self).initialize(argv=argv)
  1818.             # add an initial user
  1819.             user = orm.User(name='user')
  1820.             self.db.add(user)
  1821.             self.db.commit()
  1822.             yield super(MockHub, self).start()
  1823.             yield self.hub.server.wait_up(http=True)
  1824.             self.io_loop.add_callback(evt.set)
  1825.     
  1826.         def _start():
  1827.             self.io_loop = IOLoop()
  1828.             self.io_loop.make_current()
  1829.             self.io_loop.add_callback(_start_co)
  1830.             self.io_loop.start()
  1831.     
  1832.         self._thread = threading.Thread(target=_start)
  1833.         self._thread.start()
  1834.         ready = evt.wait(timeout=10)
  1835. >       assert ready
  1836. E       AssertionError
  1837.  
  1838. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  1839. ______________________________________________ ERROR at setup of test_home_no_auth ______________________________________________
  1840.  
  1841. request = <SubRequest 'app' for <Function 'test_root_no_auth'>>
  1842.  
  1843.     @fixture(scope='module')
  1844.     def app(request):
  1845.         app = MockHub.instance(log_level=logging.DEBUG)
  1846. >       app.start([])
  1847.  
  1848. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  1849. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1850.  
  1851. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  1852.  
  1853.     def start(self, argv=None):
  1854.         self.db_file = NamedTemporaryFile()
  1855.         self.pid_file = NamedTemporaryFile(delete=False).name
  1856.         self.db_url = self.db_file.name
  1857.     
  1858.         evt = threading.Event()
  1859.     
  1860.         @gen.coroutine
  1861.         def _start_co():
  1862.             assert self.io_loop._running
  1863.             # put initialize in start for SQLAlchemy threading reasons
  1864.             yield super(MockHub, self).initialize(argv=argv)
  1865.             # add an initial user
  1866.             user = orm.User(name='user')
  1867.             self.db.add(user)
  1868.             self.db.commit()
  1869.             yield super(MockHub, self).start()
  1870.             yield self.hub.server.wait_up(http=True)
  1871.             self.io_loop.add_callback(evt.set)
  1872.     
  1873.         def _start():
  1874.             self.io_loop = IOLoop()
  1875.             self.io_loop.make_current()
  1876.             self.io_loop.add_callback(_start_co)
  1877.             self.io_loop.start()
  1878.     
  1879.         self._thread = threading.Thread(target=_start)
  1880.         self._thread.start()
  1881.         ready = evt.wait(timeout=10)
  1882. >       assert ready
  1883. E       AssertionError
  1884.  
  1885. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  1886. _______________________________________________ ERROR at setup of test_home_auth ________________________________________________
  1887.  
  1888. request = <SubRequest 'app' for <Function 'test_root_no_auth'>>
  1889.  
  1890.     @fixture(scope='module')
  1891.     def app(request):
  1892.         app = MockHub.instance(log_level=logging.DEBUG)
  1893. >       app.start([])
  1894.  
  1895. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  1896. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1897.  
  1898. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  1899.  
  1900.     def start(self, argv=None):
  1901.         self.db_file = NamedTemporaryFile()
  1902.         self.pid_file = NamedTemporaryFile(delete=False).name
  1903.         self.db_url = self.db_file.name
  1904.     
  1905.         evt = threading.Event()
  1906.     
  1907.         @gen.coroutine
  1908.         def _start_co():
  1909.             assert self.io_loop._running
  1910.             # put initialize in start for SQLAlchemy threading reasons
  1911.             yield super(MockHub, self).initialize(argv=argv)
  1912.             # add an initial user
  1913.             user = orm.User(name='user')
  1914.             self.db.add(user)
  1915.             self.db.commit()
  1916.             yield super(MockHub, self).start()
  1917.             yield self.hub.server.wait_up(http=True)
  1918.             self.io_loop.add_callback(evt.set)
  1919.     
  1920.         def _start():
  1921.             self.io_loop = IOLoop()
  1922.             self.io_loop.make_current()
  1923.             self.io_loop.add_callback(_start_co)
  1924.             self.io_loop.start()
  1925.     
  1926.         self._thread = threading.Thread(target=_start)
  1927.         self._thread.start()
  1928.         ready = evt.wait(timeout=10)
  1929. >       assert ready
  1930. E       AssertionError
  1931.  
  1932. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  1933. _____________________________________________ ERROR at setup of test_admin_no_auth ______________________________________________
  1934.  
  1935. request = <SubRequest 'app' for <Function 'test_root_no_auth'>>
  1936.  
  1937.     @fixture(scope='module')
  1938.     def app(request):
  1939.         app = MockHub.instance(log_level=logging.DEBUG)
  1940. >       app.start([])
  1941.  
  1942. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  1943. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1944.  
  1945. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  1946.  
  1947.     def start(self, argv=None):
  1948.         self.db_file = NamedTemporaryFile()
  1949.         self.pid_file = NamedTemporaryFile(delete=False).name
  1950.         self.db_url = self.db_file.name
  1951.     
  1952.         evt = threading.Event()
  1953.     
  1954.         @gen.coroutine
  1955.         def _start_co():
  1956.             assert self.io_loop._running
  1957.             # put initialize in start for SQLAlchemy threading reasons
  1958.             yield super(MockHub, self).initialize(argv=argv)
  1959.             # add an initial user
  1960.             user = orm.User(name='user')
  1961.             self.db.add(user)
  1962.             self.db.commit()
  1963.             yield super(MockHub, self).start()
  1964.             yield self.hub.server.wait_up(http=True)
  1965.             self.io_loop.add_callback(evt.set)
  1966.     
  1967.         def _start():
  1968.             self.io_loop = IOLoop()
  1969.             self.io_loop.make_current()
  1970.             self.io_loop.add_callback(_start_co)
  1971.             self.io_loop.start()
  1972.     
  1973.         self._thread = threading.Thread(target=_start)
  1974.         self._thread.start()
  1975.         ready = evt.wait(timeout=10)
  1976. >       assert ready
  1977. E       AssertionError
  1978.  
  1979. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  1980. ____________________________________________ ERROR at setup of test_admin_not_admin _____________________________________________
  1981.  
  1982. request = <SubRequest 'app' for <Function 'test_root_no_auth'>>
  1983.  
  1984.     @fixture(scope='module')
  1985.     def app(request):
  1986.         app = MockHub.instance(log_level=logging.DEBUG)
  1987. >       app.start([])
  1988.  
  1989. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  1990. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1991.  
  1992. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  1993.  
  1994.     def start(self, argv=None):
  1995.         self.db_file = NamedTemporaryFile()
  1996.         self.pid_file = NamedTemporaryFile(delete=False).name
  1997.         self.db_url = self.db_file.name
  1998.     
  1999.         evt = threading.Event()
  2000.     
  2001.         @gen.coroutine
  2002.         def _start_co():
  2003.             assert self.io_loop._running
  2004.             # put initialize in start for SQLAlchemy threading reasons
  2005.             yield super(MockHub, self).initialize(argv=argv)
  2006.             # add an initial user
  2007.             user = orm.User(name='user')
  2008.             self.db.add(user)
  2009.             self.db.commit()
  2010.             yield super(MockHub, self).start()
  2011.             yield self.hub.server.wait_up(http=True)
  2012.             self.io_loop.add_callback(evt.set)
  2013.     
  2014.         def _start():
  2015.             self.io_loop = IOLoop()
  2016.             self.io_loop.make_current()
  2017.             self.io_loop.add_callback(_start_co)
  2018.             self.io_loop.start()
  2019.     
  2020.         self._thread = threading.Thread(target=_start)
  2021.         self._thread.start()
  2022.         ready = evt.wait(timeout=10)
  2023. >       assert ready
  2024. E       AssertionError
  2025.  
  2026. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  2027. _________________________________________________ ERROR at setup of test_admin __________________________________________________
  2028.  
  2029. request = <SubRequest 'app' for <Function 'test_root_no_auth'>>
  2030.  
  2031.     @fixture(scope='module')
  2032.     def app(request):
  2033.         app = MockHub.instance(log_level=logging.DEBUG)
  2034. >       app.start([])
  2035.  
  2036. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  2037. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2038.  
  2039. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  2040.  
  2041.     def start(self, argv=None):
  2042.         self.db_file = NamedTemporaryFile()
  2043.         self.pid_file = NamedTemporaryFile(delete=False).name
  2044.         self.db_url = self.db_file.name
  2045.     
  2046.         evt = threading.Event()
  2047.     
  2048.         @gen.coroutine
  2049.         def _start_co():
  2050.             assert self.io_loop._running
  2051.             # put initialize in start for SQLAlchemy threading reasons
  2052.             yield super(MockHub, self).initialize(argv=argv)
  2053.             # add an initial user
  2054.             user = orm.User(name='user')
  2055.             self.db.add(user)
  2056.             self.db.commit()
  2057.             yield super(MockHub, self).start()
  2058.             yield self.hub.server.wait_up(http=True)
  2059.             self.io_loop.add_callback(evt.set)
  2060.     
  2061.         def _start():
  2062.             self.io_loop = IOLoop()
  2063.             self.io_loop.make_current()
  2064.             self.io_loop.add_callback(_start_co)
  2065.             self.io_loop.start()
  2066.     
  2067.         self._thread = threading.Thread(target=_start)
  2068.         self._thread.start()
  2069.         ready = evt.wait(timeout=10)
  2070. >       assert ready
  2071. E       AssertionError
  2072.  
  2073. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  2074. _____________________________________________ ERROR at setup of test_spawn_redirect _____________________________________________
  2075.  
  2076. request = <SubRequest 'app' for <Function 'test_root_no_auth'>>
  2077.  
  2078.     @fixture(scope='module')
  2079.     def app(request):
  2080.         app = MockHub.instance(log_level=logging.DEBUG)
  2081. >       app.start([])
  2082.  
  2083. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  2084. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2085.  
  2086. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  2087.  
  2088.     def start(self, argv=None):
  2089.         self.db_file = NamedTemporaryFile()
  2090.         self.pid_file = NamedTemporaryFile(delete=False).name
  2091.         self.db_url = self.db_file.name
  2092.     
  2093.         evt = threading.Event()
  2094.     
  2095.         @gen.coroutine
  2096.         def _start_co():
  2097.             assert self.io_loop._running
  2098.             # put initialize in start for SQLAlchemy threading reasons
  2099.             yield super(MockHub, self).initialize(argv=argv)
  2100.             # add an initial user
  2101.             user = orm.User(name='user')
  2102.             self.db.add(user)
  2103.             self.db.commit()
  2104.             yield super(MockHub, self).start()
  2105.             yield self.hub.server.wait_up(http=True)
  2106.             self.io_loop.add_callback(evt.set)
  2107.     
  2108.         def _start():
  2109.             self.io_loop = IOLoop()
  2110.             self.io_loop.make_current()
  2111.             self.io_loop.add_callback(_start_co)
  2112.             self.io_loop.start()
  2113.     
  2114.         self._thread = threading.Thread(target=_start)
  2115.         self._thread.start()
  2116.         ready = evt.wait(timeout=10)
  2117. >       assert ready
  2118. E       AssertionError
  2119.  
  2120. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  2121. _______________________________________________ ERROR at setup of test_spawn_page _______________________________________________
  2122.  
  2123. request = <SubRequest 'app' for <Function 'test_root_no_auth'>>
  2124.  
  2125.     @fixture(scope='module')
  2126.     def app(request):
  2127.         app = MockHub.instance(log_level=logging.DEBUG)
  2128. >       app.start([])
  2129.  
  2130. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  2131. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2132.  
  2133. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  2134.  
  2135.     def start(self, argv=None):
  2136.         self.db_file = NamedTemporaryFile()
  2137.         self.pid_file = NamedTemporaryFile(delete=False).name
  2138.         self.db_url = self.db_file.name
  2139.     
  2140.         evt = threading.Event()
  2141.     
  2142.         @gen.coroutine
  2143.         def _start_co():
  2144.             assert self.io_loop._running
  2145.             # put initialize in start for SQLAlchemy threading reasons
  2146.             yield super(MockHub, self).initialize(argv=argv)
  2147.             # add an initial user
  2148.             user = orm.User(name='user')
  2149.             self.db.add(user)
  2150.             self.db.commit()
  2151.             yield super(MockHub, self).start()
  2152.             yield self.hub.server.wait_up(http=True)
  2153.             self.io_loop.add_callback(evt.set)
  2154.     
  2155.         def _start():
  2156.             self.io_loop = IOLoop()
  2157.             self.io_loop.make_current()
  2158.             self.io_loop.add_callback(_start_co)
  2159.             self.io_loop.start()
  2160.     
  2161.         self._thread = threading.Thread(target=_start)
  2162.         self._thread.start()
  2163.         ready = evt.wait(timeout=10)
  2164. >       assert ready
  2165. E       AssertionError
  2166.  
  2167. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  2168. _______________________________________________ ERROR at setup of test_spawn_form _______________________________________________
  2169.  
  2170. request = <SubRequest 'app' for <Function 'test_root_no_auth'>>
  2171.  
  2172.     @fixture(scope='module')
  2173.     def app(request):
  2174.         app = MockHub.instance(log_level=logging.DEBUG)
  2175. >       app.start([])
  2176.  
  2177. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  2178. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2179.  
  2180. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  2181.  
  2182.     def start(self, argv=None):
  2183.         self.db_file = NamedTemporaryFile()
  2184.         self.pid_file = NamedTemporaryFile(delete=False).name
  2185.         self.db_url = self.db_file.name
  2186.     
  2187.         evt = threading.Event()
  2188.     
  2189.         @gen.coroutine
  2190.         def _start_co():
  2191.             assert self.io_loop._running
  2192.             # put initialize in start for SQLAlchemy threading reasons
  2193.             yield super(MockHub, self).initialize(argv=argv)
  2194.             # add an initial user
  2195.             user = orm.User(name='user')
  2196.             self.db.add(user)
  2197.             self.db.commit()
  2198.             yield super(MockHub, self).start()
  2199.             yield self.hub.server.wait_up(http=True)
  2200.             self.io_loop.add_callback(evt.set)
  2201.     
  2202.         def _start():
  2203.             self.io_loop = IOLoop()
  2204.             self.io_loop.make_current()
  2205.             self.io_loop.add_callback(_start_co)
  2206.             self.io_loop.start()
  2207.     
  2208.         self._thread = threading.Thread(target=_start)
  2209.         self._thread.start()
  2210.         ready = evt.wait(timeout=10)
  2211. >       assert ready
  2212. E       AssertionError
  2213.  
  2214. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  2215. __________________________________________ ERROR at setup of test_spawn_form_with_file __________________________________________
  2216.  
  2217. request = <SubRequest 'app' for <Function 'test_root_no_auth'>>
  2218.  
  2219.     @fixture(scope='module')
  2220.     def app(request):
  2221.         app = MockHub.instance(log_level=logging.DEBUG)
  2222. >       app.start([])
  2223.  
  2224. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  2225. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2226.  
  2227. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  2228.  
  2229.     def start(self, argv=None):
  2230.         self.db_file = NamedTemporaryFile()
  2231.         self.pid_file = NamedTemporaryFile(delete=False).name
  2232.         self.db_url = self.db_file.name
  2233.     
  2234.         evt = threading.Event()
  2235.     
  2236.         @gen.coroutine
  2237.         def _start_co():
  2238.             assert self.io_loop._running
  2239.             # put initialize in start for SQLAlchemy threading reasons
  2240.             yield super(MockHub, self).initialize(argv=argv)
  2241.             # add an initial user
  2242.             user = orm.User(name='user')
  2243.             self.db.add(user)
  2244.             self.db.commit()
  2245.             yield super(MockHub, self).start()
  2246.             yield self.hub.server.wait_up(http=True)
  2247.             self.io_loop.add_callback(evt.set)
  2248.     
  2249.         def _start():
  2250.             self.io_loop = IOLoop()
  2251.             self.io_loop.make_current()
  2252.             self.io_loop.add_callback(_start_co)
  2253.             self.io_loop.start()
  2254.     
  2255.         self._thread = threading.Thread(target=_start)
  2256.         self._thread.start()
  2257.         ready = evt.wait(timeout=10)
  2258. >       assert ready
  2259. E       AssertionError
  2260.  
  2261. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  2262. _____________________________________________ ERROR at setup of test_user_redirect ______________________________________________
  2263.  
  2264. request = <SubRequest 'app' for <Function 'test_root_no_auth'>>
  2265.  
  2266.     @fixture(scope='module')
  2267.     def app(request):
  2268.         app = MockHub.instance(log_level=logging.DEBUG)
  2269. >       app.start([])
  2270.  
  2271. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  2272. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2273.  
  2274. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  2275.  
  2276.     def start(self, argv=None):
  2277.         self.db_file = NamedTemporaryFile()
  2278.         self.pid_file = NamedTemporaryFile(delete=False).name
  2279.         self.db_url = self.db_file.name
  2280.     
  2281.         evt = threading.Event()
  2282.     
  2283.         @gen.coroutine
  2284.         def _start_co():
  2285.             assert self.io_loop._running
  2286.             # put initialize in start for SQLAlchemy threading reasons
  2287.             yield super(MockHub, self).initialize(argv=argv)
  2288.             # add an initial user
  2289.             user = orm.User(name='user')
  2290.             self.db.add(user)
  2291.             self.db.commit()
  2292.             yield super(MockHub, self).start()
  2293.             yield self.hub.server.wait_up(http=True)
  2294.             self.io_loop.add_callback(evt.set)
  2295.     
  2296.         def _start():
  2297.             self.io_loop = IOLoop()
  2298.             self.io_loop.make_current()
  2299.             self.io_loop.add_callback(_start_co)
  2300.             self.io_loop.start()
  2301.     
  2302.         self._thread = threading.Thread(target=_start)
  2303.         self._thread.start()
  2304.         ready = evt.wait(timeout=10)
  2305. >       assert ready
  2306. E       AssertionError
  2307.  
  2308. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  2309. ________________________________________ ERROR at setup of test_user_redirect_deprecated ________________________________________
  2310.  
  2311. request = <SubRequest 'app' for <Function 'test_root_no_auth'>>
  2312.  
  2313.     @fixture(scope='module')
  2314.     def app(request):
  2315.         app = MockHub.instance(log_level=logging.DEBUG)
  2316. >       app.start([])
  2317.  
  2318. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  2319. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2320.  
  2321. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  2322.  
  2323.     def start(self, argv=None):
  2324.         self.db_file = NamedTemporaryFile()
  2325.         self.pid_file = NamedTemporaryFile(delete=False).name
  2326.         self.db_url = self.db_file.name
  2327.     
  2328.         evt = threading.Event()
  2329.     
  2330.         @gen.coroutine
  2331.         def _start_co():
  2332.             assert self.io_loop._running
  2333.             # put initialize in start for SQLAlchemy threading reasons
  2334.             yield super(MockHub, self).initialize(argv=argv)
  2335.             # add an initial user
  2336.             user = orm.User(name='user')
  2337.             self.db.add(user)
  2338.             self.db.commit()
  2339.             yield super(MockHub, self).start()
  2340.             yield self.hub.server.wait_up(http=True)
  2341.             self.io_loop.add_callback(evt.set)
  2342.     
  2343.         def _start():
  2344.             self.io_loop = IOLoop()
  2345.             self.io_loop.make_current()
  2346.             self.io_loop.add_callback(_start_co)
  2347.             self.io_loop.start()
  2348.     
  2349.         self._thread = threading.Thread(target=_start)
  2350.         self._thread.start()
  2351.         ready = evt.wait(timeout=10)
  2352. >       assert ready
  2353. E       AssertionError
  2354.  
  2355. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  2356. _______________________________________________ ERROR at setup of test_login_fail _______________________________________________
  2357.  
  2358. request = <SubRequest 'app' for <Function 'test_root_no_auth'>>
  2359.  
  2360.     @fixture(scope='module')
  2361.     def app(request):
  2362.         app = MockHub.instance(log_level=logging.DEBUG)
  2363. >       app.start([])
  2364.  
  2365. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  2366. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2367.  
  2368. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  2369.  
  2370.     def start(self, argv=None):
  2371.         self.db_file = NamedTemporaryFile()
  2372.         self.pid_file = NamedTemporaryFile(delete=False).name
  2373.         self.db_url = self.db_file.name
  2374.     
  2375.         evt = threading.Event()
  2376.     
  2377.         @gen.coroutine
  2378.         def _start_co():
  2379.             assert self.io_loop._running
  2380.             # put initialize in start for SQLAlchemy threading reasons
  2381.             yield super(MockHub, self).initialize(argv=argv)
  2382.             # add an initial user
  2383.             user = orm.User(name='user')
  2384.             self.db.add(user)
  2385.             self.db.commit()
  2386.             yield super(MockHub, self).start()
  2387.             yield self.hub.server.wait_up(http=True)
  2388.             self.io_loop.add_callback(evt.set)
  2389.     
  2390.         def _start():
  2391.             self.io_loop = IOLoop()
  2392.             self.io_loop.make_current()
  2393.             self.io_loop.add_callback(_start_co)
  2394.             self.io_loop.start()
  2395.     
  2396.         self._thread = threading.Thread(target=_start)
  2397.         self._thread.start()
  2398.         ready = evt.wait(timeout=10)
  2399. >       assert ready
  2400. E       AssertionError
  2401.  
  2402. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  2403. _____________________________________________ ERROR at setup of test_login_redirect _____________________________________________
  2404.  
  2405. request = <SubRequest 'app' for <Function 'test_root_no_auth'>>
  2406.  
  2407.     @fixture(scope='module')
  2408.     def app(request):
  2409.         app = MockHub.instance(log_level=logging.DEBUG)
  2410. >       app.start([])
  2411.  
  2412. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  2413. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2414.  
  2415. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  2416.  
  2417.     def start(self, argv=None):
  2418.         self.db_file = NamedTemporaryFile()
  2419.         self.pid_file = NamedTemporaryFile(delete=False).name
  2420.         self.db_url = self.db_file.name
  2421.     
  2422.         evt = threading.Event()
  2423.     
  2424.         @gen.coroutine
  2425.         def _start_co():
  2426.             assert self.io_loop._running
  2427.             # put initialize in start for SQLAlchemy threading reasons
  2428.             yield super(MockHub, self).initialize(argv=argv)
  2429.             # add an initial user
  2430.             user = orm.User(name='user')
  2431.             self.db.add(user)
  2432.             self.db.commit()
  2433.             yield super(MockHub, self).start()
  2434.             yield self.hub.server.wait_up(http=True)
  2435.             self.io_loop.add_callback(evt.set)
  2436.     
  2437.         def _start():
  2438.             self.io_loop = IOLoop()
  2439.             self.io_loop.make_current()
  2440.             self.io_loop.add_callback(_start_co)
  2441.             self.io_loop.start()
  2442.     
  2443.         self._thread = threading.Thread(target=_start)
  2444.         self._thread.start()
  2445.         ready = evt.wait(timeout=10)
  2446. >       assert ready
  2447. E       AssertionError
  2448.  
  2449. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  2450. _________________________________________________ ERROR at setup of test_logout _________________________________________________
  2451.  
  2452. request = <SubRequest 'app' for <Function 'test_root_no_auth'>>
  2453.  
  2454.     @fixture(scope='module')
  2455.     def app(request):
  2456.         app = MockHub.instance(log_level=logging.DEBUG)
  2457. >       app.start([])
  2458.  
  2459. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  2460. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2461.  
  2462. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  2463.  
  2464.     def start(self, argv=None):
  2465.         self.db_file = NamedTemporaryFile()
  2466.         self.pid_file = NamedTemporaryFile(delete=False).name
  2467.         self.db_url = self.db_file.name
  2468.     
  2469.         evt = threading.Event()
  2470.     
  2471.         @gen.coroutine
  2472.         def _start_co():
  2473.             assert self.io_loop._running
  2474.             # put initialize in start for SQLAlchemy threading reasons
  2475.             yield super(MockHub, self).initialize(argv=argv)
  2476.             # add an initial user
  2477.             user = orm.User(name='user')
  2478.             self.db.add(user)
  2479.             self.db.commit()
  2480.             yield super(MockHub, self).start()
  2481.             yield self.hub.server.wait_up(http=True)
  2482.             self.io_loop.add_callback(evt.set)
  2483.     
  2484.         def _start():
  2485.             self.io_loop = IOLoop()
  2486.             self.io_loop.make_current()
  2487.             self.io_loop.add_callback(_start_co)
  2488.             self.io_loop.start()
  2489.     
  2490.         self._thread = threading.Thread(target=_start)
  2491.         self._thread.start()
  2492.         ready = evt.wait(timeout=10)
  2493. >       assert ready
  2494. E       AssertionError
  2495.  
  2496. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  2497. ______________________________________ ERROR at setup of test_login_no_whitelist_adds_user ______________________________________
  2498.  
  2499. request = <SubRequest 'app' for <Function 'test_root_no_auth'>>
  2500.  
  2501.     @fixture(scope='module')
  2502.     def app(request):
  2503.         app = MockHub.instance(log_level=logging.DEBUG)
  2504. >       app.start([])
  2505.  
  2506. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  2507. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2508.  
  2509. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  2510.  
  2511.     def start(self, argv=None):
  2512.         self.db_file = NamedTemporaryFile()
  2513.         self.pid_file = NamedTemporaryFile(delete=False).name
  2514.         self.db_url = self.db_file.name
  2515.     
  2516.         evt = threading.Event()
  2517.     
  2518.         @gen.coroutine
  2519.         def _start_co():
  2520.             assert self.io_loop._running
  2521.             # put initialize in start for SQLAlchemy threading reasons
  2522.             yield super(MockHub, self).initialize(argv=argv)
  2523.             # add an initial user
  2524.             user = orm.User(name='user')
  2525.             self.db.add(user)
  2526.             self.db.commit()
  2527.             yield super(MockHub, self).start()
  2528.             yield self.hub.server.wait_up(http=True)
  2529.             self.io_loop.add_callback(evt.set)
  2530.     
  2531.         def _start():
  2532.             self.io_loop = IOLoop()
  2533.             self.io_loop.make_current()
  2534.             self.io_loop.add_callback(_start_co)
  2535.             self.io_loop.start()
  2536.     
  2537.         self._thread = threading.Thread(target=_start)
  2538.         self._thread.start()
  2539.         ready = evt.wait(timeout=10)
  2540. >       assert ready
  2541. E       AssertionError
  2542.  
  2543. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  2544. ______________________________________________ ERROR at setup of test_static_files ______________________________________________
  2545.  
  2546. request = <SubRequest 'app' for <Function 'test_root_no_auth'>>
  2547.  
  2548.     @fixture(scope='module')
  2549.     def app(request):
  2550.         app = MockHub.instance(log_level=logging.DEBUG)
  2551. >       app.start([])
  2552.  
  2553. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  2554. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2555.  
  2556. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  2557.  
  2558.     def start(self, argv=None):
  2559.         self.db_file = NamedTemporaryFile()
  2560.         self.pid_file = NamedTemporaryFile(delete=False).name
  2561.         self.db_url = self.db_file.name
  2562.     
  2563.         evt = threading.Event()
  2564.     
  2565.         @gen.coroutine
  2566.         def _start_co():
  2567.             assert self.io_loop._running
  2568.             # put initialize in start for SQLAlchemy threading reasons
  2569.             yield super(MockHub, self).initialize(argv=argv)
  2570.             # add an initial user
  2571.             user = orm.User(name='user')
  2572.             self.db.add(user)
  2573.             self.db.commit()
  2574.             yield super(MockHub, self).start()
  2575.             yield self.hub.server.wait_up(http=True)
  2576.             self.io_loop.add_callback(evt.set)
  2577.     
  2578.         def _start():
  2579.             self.io_loop = IOLoop()
  2580.             self.io_loop.make_current()
  2581.             self.io_loop.add_callback(_start_co)
  2582.             self.io_loop.start()
  2583.     
  2584.         self._thread = threading.Thread(target=_start)
  2585.         self._thread.start()
  2586.         ready = evt.wait(timeout=10)
  2587. >       assert ready
  2588. E       AssertionError
  2589.  
  2590. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  2591. ______________________________________________ ERROR at setup of test_check_routes ______________________________________________
  2592.  
  2593. request = <SubRequest 'app' for <Function 'test_check_routes'>>
  2594.  
  2595.     @fixture(scope='module')
  2596.     def app(request):
  2597.         app = MockHub.instance(log_level=logging.DEBUG)
  2598. >       app.start([])
  2599.  
  2600. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  2601. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2602.  
  2603. self = <jupyterhub.tests.mocking.MockHub object at 0x108253048>, argv = []
  2604.  
  2605.     def start(self, argv=None):
  2606.         self.db_file = NamedTemporaryFile()
  2607.         self.pid_file = NamedTemporaryFile(delete=False).name
  2608.         self.db_url = self.db_file.name
  2609.     
  2610.         evt = threading.Event()
  2611.     
  2612.         @gen.coroutine
  2613.         def _start_co():
  2614.             assert self.io_loop._running
  2615.             # put initialize in start for SQLAlchemy threading reasons
  2616.             yield super(MockHub, self).initialize(argv=argv)
  2617.             # add an initial user
  2618.             user = orm.User(name='user')
  2619.             self.db.add(user)
  2620.             self.db.commit()
  2621.             yield super(MockHub, self).start()
  2622.             yield self.hub.server.wait_up(http=True)
  2623.             self.io_loop.add_callback(evt.set)
  2624.     
  2625.         def _start():
  2626.             self.io_loop = IOLoop()
  2627.             self.io_loop.make_current()
  2628.             self.io_loop.add_callback(_start_co)
  2629.             self.io_loop.start()
  2630.     
  2631.         self._thread = threading.Thread(target=_start)
  2632.         self._thread.start()
  2633.         ready = evt.wait(timeout=10)
  2634. >       assert ready
  2635. E       AssertionError
  2636.  
  2637. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  2638. ----------------------------------------------------- Captured stderr setup -----------------------------------------------------
  2639. [D 2016-11-15 10:13:48.607 MockHub application:555] Looking for jupyterhub_config in /private/var/folders/6w/ngfnsn257lg4bs8drj96f92w0000gn/T/pytest-of-carol/pytest-5/test_upgrade_entrypoint0
  2640. [D 2016-11-15 10:13:48.608 MockHub app:1280] Writing PID 16448 to /var/folders/6w/ngfnsn257lg4bs8drj96f92w0000gn/T/tmpuj1tciu4
  2641. [D 2016-11-15 10:13:48.609 MockHub app:740] Generating new cookie_secret
  2642. [I 2016-11-15 10:13:48.609 MockHub app:745] Writing cookie_secret to /private/var/folders/6w/ngfnsn257lg4bs8drj96f92w0000gn/T/pytest-of-carol/pytest-5/test_upgrade_entrypoint0/jupyterhub_cookie_secret
  2643. [D 2016-11-15 10:13:48.609 MockHub app:796] Connecting to db: sqlite:////var/folders/6w/ngfnsn257lg4bs8drj96f92w0000gn/T/tmp9oafqife
  2644. [W 2016-11-15 10:13:48.632 MockHub app:365]
  2645.    Generating CONFIGPROXY_AUTH_TOKEN. Restarting the Hub will require restarting the proxy.
  2646.    Set CONFIGPROXY_AUTH_TOKEN env or JupyterHub.proxy_auth_token config to avoid this message.
  2647.    
  2648. [I 2016-11-15 10:13:48.639 MockHub app:892] Not using whitelist. Any authenticated user will be allowed.
  2649. [D 2016-11-15 10:13:48.648 MockHub app:1082] Loading state for admin from db
  2650. [D 2016-11-15 10:13:48.649 MockHub app:1094] admin not running.
  2651. [D 2016-11-15 10:13:48.649 MockHub app:1099] Loaded users:
  2652.       admin admin
  2653. [E 2016-11-15 10:13:48.654 MockHub app:1447] Failed to bind hub to http://127.0.0.1:8081/@/space%20word/hub/
  2654. [E 2016-11-15 10:13:48.654 MockHub ioloop:633] Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x108245a60>, <tornado.concurrent.Future object at 0x108253358>)
  2655.    Traceback (most recent call last):
  2656.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/ioloop.py", line 604, in _run_callback
  2657.        ret = callback()
  2658.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/stack_context.py", line 275, in null_wrapper
  2659.        return fn(*args, **kwargs)
  2660.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/ioloop.py", line 619, in <lambda>
  2661.        self.add_future(ret, lambda f: f.result())
  2662.      File "/Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py", line 165, in _start_co
  2663.        yield super(MockHub, self).start()
  2664.      File "/Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/app.py", line 1445, in start
  2665.        self.http_server.listen(self.hub_port, address=self.hub_ip)
  2666.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/tcpserver.py", line 126, in listen
  2667.        sockets = bind_sockets(port, address=address)
  2668.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/netutil.py", line 194, in bind_sockets
  2669.        sock.bind(sockaddr)
  2670.    OSError: [Errno 48] Address already in use
  2671.    
  2672. __________________________________________ ERROR at setup of test_patch_proxy_bad_req ___________________________________________
  2673.  
  2674. request = <SubRequest 'app' for <Function 'test_check_routes'>>
  2675.  
  2676.     @fixture(scope='module')
  2677.     def app(request):
  2678.         app = MockHub.instance(log_level=logging.DEBUG)
  2679. >       app.start([])
  2680.  
  2681. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  2682. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2683.  
  2684. self = <jupyterhub.tests.mocking.MockHub object at 0x108253048>, argv = []
  2685.  
  2686.     def start(self, argv=None):
  2687.         self.db_file = NamedTemporaryFile()
  2688.         self.pid_file = NamedTemporaryFile(delete=False).name
  2689.         self.db_url = self.db_file.name
  2690.     
  2691.         evt = threading.Event()
  2692.     
  2693.         @gen.coroutine
  2694.         def _start_co():
  2695.             assert self.io_loop._running
  2696.             # put initialize in start for SQLAlchemy threading reasons
  2697.             yield super(MockHub, self).initialize(argv=argv)
  2698.             # add an initial user
  2699.             user = orm.User(name='user')
  2700.             self.db.add(user)
  2701.             self.db.commit()
  2702.             yield super(MockHub, self).start()
  2703.             yield self.hub.server.wait_up(http=True)
  2704.             self.io_loop.add_callback(evt.set)
  2705.     
  2706.         def _start():
  2707.             self.io_loop = IOLoop()
  2708.             self.io_loop.make_current()
  2709.             self.io_loop.add_callback(_start_co)
  2710.             self.io_loop.start()
  2711.     
  2712.         self._thread = threading.Thread(target=_start)
  2713.         self._thread.start()
  2714.         ready = evt.wait(timeout=10)
  2715. >       assert ready
  2716. E       AssertionError
  2717.  
  2718. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  2719. ____________________________________________ ERROR at setup of test_managed_service _____________________________________________
  2720.  
  2721. request = <SubRequest 'app' for <Function 'test_managed_service'>>
  2722.  
  2723.     @fixture(scope='module')
  2724.     def app(request):
  2725.         app = MockHub.instance(log_level=logging.DEBUG)
  2726. >       app.start([])
  2727.  
  2728. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  2729. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2730.  
  2731. self = <jupyterhub.tests.mocking.MockHub object at 0x108253048>, argv = []
  2732.  
  2733.     def start(self, argv=None):
  2734.         self.db_file = NamedTemporaryFile()
  2735.         self.pid_file = NamedTemporaryFile(delete=False).name
  2736.         self.db_url = self.db_file.name
  2737.     
  2738.         evt = threading.Event()
  2739.     
  2740.         @gen.coroutine
  2741.         def _start_co():
  2742.             assert self.io_loop._running
  2743.             # put initialize in start for SQLAlchemy threading reasons
  2744.             yield super(MockHub, self).initialize(argv=argv)
  2745.             # add an initial user
  2746.             user = orm.User(name='user')
  2747.             self.db.add(user)
  2748.             self.db.commit()
  2749.             yield super(MockHub, self).start()
  2750.             yield self.hub.server.wait_up(http=True)
  2751.             self.io_loop.add_callback(evt.set)
  2752.     
  2753.         def _start():
  2754.             self.io_loop = IOLoop()
  2755.             self.io_loop.make_current()
  2756.             self.io_loop.add_callback(_start_co)
  2757.             self.io_loop.start()
  2758.     
  2759.         self._thread = threading.Thread(target=_start)
  2760.         self._thread.start()
  2761.         ready = evt.wait(timeout=10)
  2762. >       assert ready
  2763. E       AssertionError
  2764.  
  2765. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  2766. ----------------------------------------------------- Captured stderr setup -----------------------------------------------------
  2767. [D 2016-11-15 10:13:58.636 MockHub application:555] Looking for jupyterhub_config in /private/var/folders/6w/ngfnsn257lg4bs8drj96f92w0000gn/T/pytest-of-carol/pytest-5/test_upgrade_entrypoint0
  2768. [D 2016-11-15 10:13:58.637 MockHub app:1280] Writing PID 16448 to /var/folders/6w/ngfnsn257lg4bs8drj96f92w0000gn/T/tmpjpjo8ims
  2769. [D 2016-11-15 10:13:58.637 MockHub app:796] Connecting to db: sqlite:////var/folders/6w/ngfnsn257lg4bs8drj96f92w0000gn/T/tmplr79ka12
  2770. [I 2016-11-15 10:13:58.668 MockHub app:892] Not using whitelist. Any authenticated user will be allowed.
  2771. [D 2016-11-15 10:13:58.676 MockHub app:1082] Loading state for admin from db
  2772. [D 2016-11-15 10:13:58.676 MockHub app:1094] admin not running.
  2773. [D 2016-11-15 10:13:58.676 MockHub app:1099] Loaded users:
  2774.       admin admin
  2775. [E 2016-11-15 10:13:58.682 MockHub app:1447] Failed to bind hub to http://127.0.0.1:8081/@/space%20word/hub/
  2776. [E 2016-11-15 10:13:58.682 MockHub ioloop:633] Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x10823c950>, <tornado.concurrent.Future object at 0x1081f58d0>)
  2777.    Traceback (most recent call last):
  2778.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/ioloop.py", line 604, in _run_callback
  2779.        ret = callback()
  2780.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/stack_context.py", line 275, in null_wrapper
  2781.        return fn(*args, **kwargs)
  2782.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/ioloop.py", line 619, in <lambda>
  2783.        self.add_future(ret, lambda f: f.result())
  2784.      File "/Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py", line 165, in _start_co
  2785.        yield super(MockHub, self).start()
  2786.      File "/Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/app.py", line 1445, in start
  2787.        self.http_server.listen(self.hub_port, address=self.hub_ip)
  2788.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/tcpserver.py", line 126, in listen
  2789.        sockets = bind_sockets(port, address=address)
  2790.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/netutil.py", line 194, in bind_sockets
  2791.        sock.bind(sockaddr)
  2792.    OSError: [Errno 48] Address already in use
  2793.    
  2794. _____________________________________________ ERROR at setup of test_proxy_service ______________________________________________
  2795.  
  2796. request = <SubRequest 'app' for <Function 'test_managed_service'>>
  2797.  
  2798.     @fixture(scope='module')
  2799.     def app(request):
  2800.         app = MockHub.instance(log_level=logging.DEBUG)
  2801. >       app.start([])
  2802.  
  2803. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  2804. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2805.  
  2806. self = <jupyterhub.tests.mocking.MockHub object at 0x108253048>, argv = []
  2807.  
  2808.     def start(self, argv=None):
  2809.         self.db_file = NamedTemporaryFile()
  2810.         self.pid_file = NamedTemporaryFile(delete=False).name
  2811.         self.db_url = self.db_file.name
  2812.     
  2813.         evt = threading.Event()
  2814.     
  2815.         @gen.coroutine
  2816.         def _start_co():
  2817.             assert self.io_loop._running
  2818.             # put initialize in start for SQLAlchemy threading reasons
  2819.             yield super(MockHub, self).initialize(argv=argv)
  2820.             # add an initial user
  2821.             user = orm.User(name='user')
  2822.             self.db.add(user)
  2823.             self.db.commit()
  2824.             yield super(MockHub, self).start()
  2825.             yield self.hub.server.wait_up(http=True)
  2826.             self.io_loop.add_callback(evt.set)
  2827.     
  2828.         def _start():
  2829.             self.io_loop = IOLoop()
  2830.             self.io_loop.make_current()
  2831.             self.io_loop.add_callback(_start_co)
  2832.             self.io_loop.start()
  2833.     
  2834.         self._thread = threading.Thread(target=_start)
  2835.         self._thread.start()
  2836.         ready = evt.wait(timeout=10)
  2837. >       assert ready
  2838. E       AssertionError
  2839.  
  2840. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  2841. ____________________________________________ ERROR at setup of test_external_service ____________________________________________
  2842.  
  2843. request = <SubRequest 'app' for <Function 'test_managed_service'>>
  2844.  
  2845.     @fixture(scope='module')
  2846.     def app(request):
  2847.         app = MockHub.instance(log_level=logging.DEBUG)
  2848. >       app.start([])
  2849.  
  2850. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  2851. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2852.  
  2853. self = <jupyterhub.tests.mocking.MockHub object at 0x108253048>, argv = []
  2854.  
  2855.     def start(self, argv=None):
  2856.         self.db_file = NamedTemporaryFile()
  2857.         self.pid_file = NamedTemporaryFile(delete=False).name
  2858.         self.db_url = self.db_file.name
  2859.     
  2860.         evt = threading.Event()
  2861.     
  2862.         @gen.coroutine
  2863.         def _start_co():
  2864.             assert self.io_loop._running
  2865.             # put initialize in start for SQLAlchemy threading reasons
  2866.             yield super(MockHub, self).initialize(argv=argv)
  2867.             # add an initial user
  2868.             user = orm.User(name='user')
  2869.             self.db.add(user)
  2870.             self.db.commit()
  2871.             yield super(MockHub, self).start()
  2872.             yield self.hub.server.wait_up(http=True)
  2873.             self.io_loop.add_callback(evt.set)
  2874.     
  2875.         def _start():
  2876.             self.io_loop = IOLoop()
  2877.             self.io_loop.make_current()
  2878.             self.io_loop.add_callback(_start_co)
  2879.             self.io_loop.start()
  2880.     
  2881.         self._thread = threading.Thread(target=_start)
  2882.         self._thread.start()
  2883.         ready = evt.wait(timeout=10)
  2884. >       assert ready
  2885. E       AssertionError
  2886.  
  2887. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  2888. __________________________________________ ERROR at setup of test_service_cookie_auth ___________________________________________
  2889.  
  2890. request = <SubRequest 'app' for <Function 'test_service_cookie_auth'>>
  2891.  
  2892.     @fixture(scope='module')
  2893.     def app(request):
  2894.         app = MockHub.instance(log_level=logging.DEBUG)
  2895. >       app.start([])
  2896.  
  2897. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  2898. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2899.  
  2900. self = <jupyterhub.tests.mocking.MockHub object at 0x108253048>, argv = []
  2901.  
  2902.     def start(self, argv=None):
  2903.         self.db_file = NamedTemporaryFile()
  2904.         self.pid_file = NamedTemporaryFile(delete=False).name
  2905.         self.db_url = self.db_file.name
  2906.     
  2907.         evt = threading.Event()
  2908.     
  2909.         @gen.coroutine
  2910.         def _start_co():
  2911.             assert self.io_loop._running
  2912.             # put initialize in start for SQLAlchemy threading reasons
  2913.             yield super(MockHub, self).initialize(argv=argv)
  2914.             # add an initial user
  2915.             user = orm.User(name='user')
  2916.             self.db.add(user)
  2917.             self.db.commit()
  2918.             yield super(MockHub, self).start()
  2919.             yield self.hub.server.wait_up(http=True)
  2920.             self.io_loop.add_callback(evt.set)
  2921.     
  2922.         def _start():
  2923.             self.io_loop = IOLoop()
  2924.             self.io_loop.make_current()
  2925.             self.io_loop.add_callback(_start_co)
  2926.             self.io_loop.start()
  2927.     
  2928.         self._thread = threading.Thread(target=_start)
  2929.         self._thread.start()
  2930.         ready = evt.wait(timeout=10)
  2931. >       assert ready
  2932. E       AssertionError
  2933.  
  2934. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  2935. ----------------------------------------------------- Captured stderr setup -----------------------------------------------------
  2936. [D 2016-11-15 10:14:08.728 MockHub application:555] Looking for jupyterhub_config in /private/var/folders/6w/ngfnsn257lg4bs8drj96f92w0000gn/T/pytest-of-carol/pytest-5/test_upgrade_entrypoint0
  2937. [D 2016-11-15 10:14:08.728 MockHub app:1280] Writing PID 16448 to /var/folders/6w/ngfnsn257lg4bs8drj96f92w0000gn/T/tmpkigl2v5u
  2938. [D 2016-11-15 10:14:08.729 MockHub app:796] Connecting to db: sqlite:////var/folders/6w/ngfnsn257lg4bs8drj96f92w0000gn/T/tmpc7ist350
  2939. [I 2016-11-15 10:14:08.758 MockHub app:892] Not using whitelist. Any authenticated user will be allowed.
  2940. [D 2016-11-15 10:14:08.767 MockHub app:1082] Loading state for admin from db
  2941. [D 2016-11-15 10:14:08.768 MockHub app:1094] admin not running.
  2942. [D 2016-11-15 10:14:08.768 MockHub app:1099] Loaded users:
  2943.       admin admin
  2944. [E 2016-11-15 10:14:08.773 MockHub app:1447] Failed to bind hub to http://127.0.0.1:8081/@/space%20word/hub/
  2945. [E 2016-11-15 10:14:08.773 MockHub ioloop:633] Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x10aeff510>, <tornado.concurrent.Future object at 0x10826ea58>)
  2946.    Traceback (most recent call last):
  2947.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/ioloop.py", line 604, in _run_callback
  2948.        ret = callback()
  2949.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/stack_context.py", line 275, in null_wrapper
  2950.        return fn(*args, **kwargs)
  2951.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/ioloop.py", line 619, in <lambda>
  2952.        self.add_future(ret, lambda f: f.result())
  2953.      File "/Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py", line 165, in _start_co
  2954.        yield super(MockHub, self).start()
  2955.      File "/Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/app.py", line 1445, in start
  2956.        self.http_server.listen(self.hub_port, address=self.hub_ip)
  2957.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/tcpserver.py", line 126, in listen
  2958.        sockets = bind_sockets(port, address=address)
  2959.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/netutil.py", line 194, in bind_sockets
  2960.        sock.bind(sockaddr)
  2961.    OSError: [Errno 48] Address already in use
  2962.    
  2963. ____________________________________________ ERROR at setup of test_singleuser_auth _____________________________________________
  2964.  
  2965. request = <SubRequest 'app' for <Function 'test_singleuser_auth'>>
  2966.  
  2967.     @fixture(scope='module')
  2968.     def app(request):
  2969.         app = MockHub.instance(log_level=logging.DEBUG)
  2970. >       app.start([])
  2971.  
  2972. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  2973. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2974.  
  2975. self = <jupyterhub.tests.mocking.MockHub object at 0x108253048>, argv = []
  2976.  
  2977.     def start(self, argv=None):
  2978.         self.db_file = NamedTemporaryFile()
  2979.         self.pid_file = NamedTemporaryFile(delete=False).name
  2980.         self.db_url = self.db_file.name
  2981.     
  2982.         evt = threading.Event()
  2983.     
  2984.         @gen.coroutine
  2985.         def _start_co():
  2986.             assert self.io_loop._running
  2987.             # put initialize in start for SQLAlchemy threading reasons
  2988.             yield super(MockHub, self).initialize(argv=argv)
  2989.             # add an initial user
  2990.             user = orm.User(name='user')
  2991.             self.db.add(user)
  2992.             self.db.commit()
  2993.             yield super(MockHub, self).start()
  2994.             yield self.hub.server.wait_up(http=True)
  2995.             self.io_loop.add_callback(evt.set)
  2996.     
  2997.         def _start():
  2998.             self.io_loop = IOLoop()
  2999.             self.io_loop.make_current()
  3000.             self.io_loop.add_callback(_start_co)
  3001.             self.io_loop.start()
  3002.     
  3003.         self._thread = threading.Thread(target=_start)
  3004.         self._thread.start()
  3005.         ready = evt.wait(timeout=10)
  3006. >       assert ready
  3007. E       AssertionError
  3008.  
  3009. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  3010. ----------------------------------------------------- Captured stderr setup -----------------------------------------------------
  3011. [D 2016-11-15 10:14:18.747 MockHub application:555] Looking for jupyterhub_config in /private/var/folders/6w/ngfnsn257lg4bs8drj96f92w0000gn/T/pytest-of-carol/pytest-5/test_upgrade_entrypoint0
  3012. [D 2016-11-15 10:14:18.747 MockHub app:1280] Writing PID 16448 to /var/folders/6w/ngfnsn257lg4bs8drj96f92w0000gn/T/tmpfwqudaba
  3013. [D 2016-11-15 10:14:18.748 MockHub app:796] Connecting to db: sqlite:////var/folders/6w/ngfnsn257lg4bs8drj96f92w0000gn/T/tmpwn26qur6
  3014. [I 2016-11-15 10:14:18.816 MockHub app:892] Not using whitelist. Any authenticated user will be allowed.
  3015. [D 2016-11-15 10:14:18.826 MockHub app:1082] Loading state for admin from db
  3016. [D 2016-11-15 10:14:18.826 MockHub app:1094] admin not running.
  3017. [D 2016-11-15 10:14:18.826 MockHub app:1099] Loaded users:
  3018.       admin admin
  3019. [E 2016-11-15 10:14:18.834 MockHub app:1447] Failed to bind hub to http://127.0.0.1:8081/@/space%20word/hub/
  3020. [E 2016-11-15 10:14:18.834 MockHub ioloop:633] Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x1073180d0>, <tornado.concurrent.Future object at 0x1077c1cc0>)
  3021.    Traceback (most recent call last):
  3022.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/ioloop.py", line 604, in _run_callback
  3023.        ret = callback()
  3024.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/stack_context.py", line 275, in null_wrapper
  3025.        return fn(*args, **kwargs)
  3026.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/ioloop.py", line 619, in <lambda>
  3027.        self.add_future(ret, lambda f: f.result())
  3028.      File "/Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py", line 165, in _start_co
  3029.        yield super(MockHub, self).start()
  3030.      File "/Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/app.py", line 1445, in start
  3031.        self.http_server.listen(self.hub_port, address=self.hub_ip)
  3032.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/tcpserver.py", line 126, in listen
  3033.        sockets = bind_sockets(port, address=address)
  3034.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/netutil.py", line 194, in bind_sockets
  3035.        sock.bind(sockaddr)
  3036.    OSError: [Errno 48] Address already in use
  3037.    
  3038. __________________________________________ ERROR at setup of test_disable_user_config ___________________________________________
  3039.  
  3040. request = <SubRequest 'app' for <Function 'test_singleuser_auth'>>
  3041.  
  3042.     @fixture(scope='module')
  3043.     def app(request):
  3044.         app = MockHub.instance(log_level=logging.DEBUG)
  3045. >       app.start([])
  3046.  
  3047. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/conftest.py:55:
  3048. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  3049.  
  3050. self = <jupyterhub.tests.mocking.MockHub object at 0x108253048>, argv = []
  3051.  
  3052.     def start(self, argv=None):
  3053.         self.db_file = NamedTemporaryFile()
  3054.         self.pid_file = NamedTemporaryFile(delete=False).name
  3055.         self.db_url = self.db_file.name
  3056.     
  3057.         evt = threading.Event()
  3058.     
  3059.         @gen.coroutine
  3060.         def _start_co():
  3061.             assert self.io_loop._running
  3062.             # put initialize in start for SQLAlchemy threading reasons
  3063.             yield super(MockHub, self).initialize(argv=argv)
  3064.             # add an initial user
  3065.             user = orm.User(name='user')
  3066.             self.db.add(user)
  3067.             self.db.commit()
  3068.             yield super(MockHub, self).start()
  3069.             yield self.hub.server.wait_up(http=True)
  3070.             self.io_loop.add_callback(evt.set)
  3071.     
  3072.         def _start():
  3073.             self.io_loop = IOLoop()
  3074.             self.io_loop.make_current()
  3075.             self.io_loop.add_callback(_start_co)
  3076.             self.io_loop.start()
  3077.     
  3078.         self._thread = threading.Thread(target=_start)
  3079.         self._thread.start()
  3080.         ready = evt.wait(timeout=10)
  3081. >       assert ready
  3082. E       AssertionError
  3083.  
  3084. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  3085. =========================================================== FAILURES ============================================================
  3086. ______________________________________________________ test_external_proxy ______________________________________________________
  3087.  
  3088. request = <FixtureRequest for <Function 'test_external_proxy'>>, io_loop = <zmq.eventloop.ioloop.ZMQIOLoop object at 0x108214080>
  3089.  
  3090.     def test_external_proxy(request, io_loop):
  3091.         """Test a proxy started before the Hub"""
  3092.         auth_token='secret!'
  3093.         proxy_ip = '127.0.0.1'
  3094.         proxy_port = 54321
  3095.     
  3096.         app = MockHub.instance(
  3097.             proxy_api_ip=proxy_ip,
  3098.             proxy_api_port=proxy_port,
  3099.             proxy_auth_token=auth_token,
  3100.         )
  3101.         def fin():
  3102.             MockHub.clear_instance()
  3103.             app.stop()
  3104.         request.addfinalizer(fin)
  3105.         env = os.environ.copy()
  3106.         env['CONFIGPROXY_AUTH_TOKEN'] = auth_token
  3107.         cmd = app.proxy_cmd + [
  3108.             '--ip', app.ip,
  3109.             '--port', str(app.port),
  3110.             '--api-ip', proxy_ip,
  3111.             '--api-port', str(proxy_port),
  3112.             '--default-target', 'http://%s:%i' % (app.hub_ip, app.hub_port),
  3113.         ]
  3114.         if app.subdomain_host:
  3115.             cmd.append('--host-routing')
  3116.         proxy = Popen(cmd, env=env)
  3117.         def _cleanup_proxy():
  3118.             if proxy.poll() is None:
  3119.                 proxy.terminate()
  3120.         request.addfinalizer(_cleanup_proxy)
  3121.     
  3122.         def wait_for_proxy():
  3123.             io_loop.run_sync(lambda : wait_for_http_server(
  3124.                 'http://%s:%i' % (proxy_ip, proxy_port)))
  3125.         wait_for_proxy()
  3126.     
  3127. >       app.start([])
  3128.  
  3129. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/test_proxy.py:51:
  3130. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  3131.  
  3132. self = <jupyterhub.tests.mocking.MockHub object at 0x107040ba8>, argv = []
  3133.  
  3134.     def start(self, argv=None):
  3135.         self.db_file = NamedTemporaryFile()
  3136.         self.pid_file = NamedTemporaryFile(delete=False).name
  3137.         self.db_url = self.db_file.name
  3138.     
  3139.         evt = threading.Event()
  3140.     
  3141.         @gen.coroutine
  3142.         def _start_co():
  3143.             assert self.io_loop._running
  3144.             # put initialize in start for SQLAlchemy threading reasons
  3145.             yield super(MockHub, self).initialize(argv=argv)
  3146.             # add an initial user
  3147.             user = orm.User(name='user')
  3148.             self.db.add(user)
  3149.             self.db.commit()
  3150.             yield super(MockHub, self).start()
  3151.             yield self.hub.server.wait_up(http=True)
  3152.             self.io_loop.add_callback(evt.set)
  3153.     
  3154.         def _start():
  3155.             self.io_loop = IOLoop()
  3156.             self.io_loop.make_current()
  3157.             self.io_loop.add_callback(_start_co)
  3158.             self.io_loop.start()
  3159.     
  3160.         self._thread = threading.Thread(target=_start)
  3161.         self._thread.start()
  3162.         ready = evt.wait(timeout=10)
  3163. >       assert ready
  3164. E       AssertionError
  3165.  
  3166. /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py:178: AssertionError
  3167. ----------------------------------------------------- Captured stdout call ------------------------------------------------------
  3168. 10:13:38.461 - info: [ConfigProxy] Proxying http://127.0.0.1:8000 to http://127.0.0.1:8081
  3169. 10:13:38.464 - info: [ConfigProxy] Proxy API at http://127.0.0.1:54321/api/routes
  3170. ----------------------------------------------------- Captured stderr call ------------------------------------------------------
  3171. 10:13:38.469 - error: [ConfigProxy] Uncaught Exception Error: listen EADDRINUSE 127.0.0.1:8000
  3172.    at Object.exports._errnoException (util.js:1022:11)
  3173.    at exports._exceptionWithHostPort (util.js:1045:20)
  3174.    at Server._listen2 (net.js:1262:14)
  3175.    at listen (net.js:1298:10)
  3176.    at doListening (net.js:1397:7)
  3177.    at _combinedTickCallback (internal/process/next_tick.js:77:11)
  3178.    at process._tickCallback (internal/process/next_tick.js:98:9)
  3179.    at Module.runMain (module.js:609:11)
  3180.    at run (bootstrap_node.js:420:7)
  3181.    at startup (bootstrap_node.js:139:9)
  3182. 10:13:38.563 - error: [ConfigProxy] 404 GET /
  3183. [I 2016-11-15 10:13:38.600 MockHub app:892] Not using whitelist. Any authenticated user will be allowed.
  3184. [E 2016-11-15 10:13:38.614 MockHub app:1447] Failed to bind hub to http://127.0.0.1:8081/@/space%20word/hub/
  3185. [E 2016-11-15 10:13:38.615 MockHub ioloop:633] Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x108236510>, <tornado.concurrent.Future object at 0x1077ea2b0>)
  3186.    Traceback (most recent call last):
  3187.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/ioloop.py", line 604, in _run_callback
  3188.        ret = callback()
  3189.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/stack_context.py", line 275, in null_wrapper
  3190.        return fn(*args, **kwargs)
  3191.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/ioloop.py", line 619, in <lambda>
  3192.        self.add_future(ret, lambda f: f.result())
  3193.      File "/Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/mocking.py", line 165, in _start_co
  3194.        yield super(MockHub, self).start()
  3195.      File "/Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/app.py", line 1445, in start
  3196.        self.http_server.listen(self.hub_port, address=self.hub_ip)
  3197.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/tcpserver.py", line 126, in listen
  3198.        sockets = bind_sockets(port, address=address)
  3199.      File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/site-packages/tornado/netutil.py", line 194, in bind_sockets
  3200.        sock.bind(sockaddr)
  3201.    OSError: [Errno 48] Address already in use
  3202.    
  3203. --------------------------------------------------- Captured stderr teardown ----------------------------------------------------
  3204. [I 2016-11-15 10:13:48.581 MockHub app:1329] Cleaning up single-user servers...
  3205. [I 2016-11-15 10:13:48.601 MockHub app:1347] I didn't start the proxy, I can't clean it up
  3206. [I 2016-11-15 10:13:48.602 MockHub app:1362] Cleaning up PID file /var/folders/6w/ngfnsn257lg4bs8drj96f92w0000gn/T/tmp7zjcitdh
  3207. [I 2016-11-15 10:13:48.602 MockHub app:1366] ...done
  3208. ==================================================== pytest-warning summary =====================================================
  3209. WC1 /Users/carol/test-sandbox-Ana/jupyterhub/jupyterhub/tests/test_singleuser.py cannot collect test class 'TestSingleUserSpawner' because it has a __init__ constructor
  3210. =============================== 1 failed, 48 passed, 1 pytest-warnings, 61 error in 95.26 seconds ===============================
  3211. ^CException ignored in: <module 'threading' from '/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/threading.py'>
  3212. Traceback (most recent call last):
  3213.  File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/threading.py", line 1288, in _shutdown
  3214.    t.join()
  3215.  File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/threading.py", line 1054, in join
  3216.    self._wait_for_tstate_lock()
  3217.  File "/Users/carol/anaconda3/envs/test-Ana3-jh/lib/python3.5/threading.py", line 1070, in _wait_for_tstate_lock
  3218.    elif lock.acquire(block, timeout):
  3219. KeyboardInterrupt
  3220. (test-Ana3-jh) carol at Carols-MacBook-Pro-2 in ~/test-sandbox-Ana/jupyterhub on master*
  3221.  
  3222. [10:16:08]$ (B
Advertisement
Add Comment
Please, Sign In to add comment