Skip to content

Commit

Permalink
Follow-up for missed mozlog usage in unit tests (mozilla#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
whimboo committed Feb 9, 2016
1 parent 0ce314d commit a46d719
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
6 changes: 3 additions & 3 deletions tests/mozhttpd_base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

from __future__ import absolute_import, print_function, unicode_literals

import logging
import os
import tempfile
import unittest

import mozfile
import mozlog
from wptserve import server

WDIR = 'data'
Expand All @@ -23,8 +23,8 @@ class MozHttpdBaseTest(unittest.TestCase):

@classmethod
def setUpClass(cls):
cls.logger = mozlog.unstructured.getLogger(self.__class__.__name__)
cls.logger.setLevel('ERROR')
logging.basicConfig(format=' %(levelname)s | %(message)s', level=logging.ERROR)
cls.logger = logging.getLogger()

cls.httpd = server.WebTestHttpd(port=8080,
doc_root=os.path.join(HERE, WDIR),
Expand Down
6 changes: 3 additions & 3 deletions tests/remote/test_fennec.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.

import logging
import tempfile
import unittest

import mozfile
import mozlog

import mozdownload

Expand Down Expand Up @@ -81,8 +81,8 @@ class FennecRemoteTests(unittest.TestCase):
"""Test all scraper classes for Fennec against the remote server"""

def setUp(self):
self.logger = mozlog.unstructured.getLogger(self.__class__.__name__)
self.logger.setLevel('ERROR')
logging.basicConfig(format=' %(levelname)s | %(message)s', level=logging.ERROR)
self.logger = logging.getLogger(self.__class__.__name__)

# Create a temporary directory for potential downloads
self.temp_dir = tempfile.mkdtemp()
Expand Down
6 changes: 3 additions & 3 deletions tests/remote/test_firefox.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.

import logging
import tempfile
import unittest
import urllib

import mozfile
import mozlog

import mozdownload
from mozdownload.scraper import BASE_URL
Expand Down Expand Up @@ -211,8 +211,8 @@ class FirefoxRemoteTests(unittest.TestCase):
"""Test all scraper classes for Firefox against the remote server"""

def setUp(self):
self.logger = mozlog.unstructured.getLogger(self.__class__.__name__)
self.logger.setLevel('ERROR')
logging.basicConfig(format=' %(levelname)s | %(message)s', level=logging.ERROR)
self.logger = logging.getLogger(self.__class__.__name__)

# Create a temporary directory for potential downloads
self.temp_dir = tempfile.mkdtemp()
Expand Down
6 changes: 3 additions & 3 deletions tests/remote/test_thunderbird.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.

import logging
import tempfile
import unittest
import urllib

import mozfile
import mozlog

import mozdownload
from mozdownload.scraper import BASE_URL
Expand Down Expand Up @@ -216,8 +216,8 @@ class ThunderbirdRemoteTests(unittest.TestCase):
"""Test all scraper classes for Thunderbird against the remote server"""

def setUp(self):
self.logger = mozlog.unstructured.getLogger(self.__class__.__name__)
self.logger.setLevel('ERROR')
logging.basicConfig(format=' %(levelname)s | %(message)s', level=logging.ERROR)
self.logger = logging.getLogger(self.__class__.__name__)

# Create a temporary directory for potential downloads
self.temp_dir = tempfile.mkdtemp()
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ envlist = py27
deps =
manifestparser >= 1.1
mozfile >= 1.1
mozlog >= 3.0
mozprocess >= 0.22
moztest >= 0.7
wptserve >= 1.4.0
Expand Down

0 comments on commit a46d719

Please sign in to comment.