def test_responder_debug_mode_is_same_as_make_app_debug_mode(self): self.assertFalse(application.make_app(debug=False)._router.find('/sonos-server/test-command')[0].DEBUG_MODE) self.assertTrue(application.make_app(debug=True)._router.find('/sonos-server/test-command')[0].DEBUG_MODE)
def test_responder_configuration(self): expected_number_of_routes = 1 app = application.make_app() self.assertEqual(len(app._router._return_values), expected_number_of_routes) resource = app._router.find('/sonos-server/test-command')[0] self.assertIsInstance(resource, responders.DeviceCommandResponder)
def test_responder_debug_mode_configuration_default_value(self): app = application.make_app() resource = app._router.find('/sonos-server/test-command')[0] self.assertFalse(resource.DEBUG_MODE)
def test_returns_falcon_app(self): self.assertIsInstance(application.make_app(), falcon.API)