summaryrefslogtreecommitdiff
path: root/service/test/functional
diff options
context:
space:
mode:
authorBruno Wagner <bwagner@riseup.net>2016-10-19 16:56:43 -0200
committerBruno Wagner <bwagner@riseup.net>2016-10-19 16:56:43 -0200
commit425d6a54e13be2cdcd18f1b21a4ff70ae5d43ff0 (patch)
tree6705d319deaaf9aee234e82c7e0f6815926f17ba /service/test/functional
parentf47533fed69c0ede45285a236bb85efa2938f134 (diff)
Adapted logging in the UA to use twisted.logger
Diffstat (limited to 'service/test/functional')
-rw-r--r--service/test/functional/features/environment.py23
1 files changed, 15 insertions, 8 deletions
diff --git a/service/test/functional/features/environment.py b/service/test/functional/features/environment.py
index 41f2c8c7..77efc499 100644
--- a/service/test/functional/features/environment.py
+++ b/service/test/functional/features/environment.py
@@ -13,24 +13,32 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
-import logging
import uuid
+import os
+from selenium import webdriver
from crochet import setup, wait_for
-from leap.common.events.server import ensure_server
+
from twisted.internet import defer
+from twisted.logger import globalLogBeginner, textFileLogObserver, Logger
-from pixelated.application import UserAgentMode
-from pixelated.config.site import PixelatedSite
from test.support.integration import AppTestClient
-from selenium import webdriver
+from steps.common import *
+from leap.common.events.server import ensure_server
+
+from pixelated.application import UserAgentMode
+from pixelated.config.site import PixelatedSite
from pixelated.resources.features_resource import FeaturesResource
-from steps.common import *
-import os
setup()
+observers = [textFileLogObserver(open(os.devnull, 'w'))]
+
+globalLogBeginner.beginLoggingTo(observers)
+
+Logger('twisted')
+
@wait_for(timeout=5.0)
def start_app_test_client(client, mode):
@@ -39,7 +47,6 @@ def start_app_test_client(client, mode):
def before_all(context):
ensure_server()
- logging.disable('INFO')
PixelatedSite.disable_csp_requests()
client = AppTestClient()
start_app_test_client(client, UserAgentMode(is_single_user=True))