Skip to content

Commit

Permalink
fix logging test
Browse files Browse the repository at this point in the history
  • Loading branch information
ebeesonjanrain committed Mar 14, 2016
1 parent 825ba18 commit 99311ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bluekai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def logging_init(app):
handler = logging.handlers.RotatingFileHandler(
app.config['APP_LOG_FILE'],
backupCount=app.config['APP_LOG_NUM_BACKUPS'],
maxBytes=int(app.config['APP_LOG_FILESIZE']))
maxBytes=app.config['APP_LOG_FILESIZE'])

if app.debug:
handler.setLevel(logging.DEBUG)
Expand Down
7 changes: 2 additions & 5 deletions tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,11 @@ class logging_init_test(TestCase):

def setUp(self):

self.config = {
'DEBUG': "",
}
self.app = Mock()
self.app.config = {
'APP_LOG_FILE': 'test_app_log_file',
'APP_LOG_FILE': 'test_app_log_file.log',
'APP_LOG_NUM_BACKUPS': 'test_app_log_backups',
'APP_LOG_FILESIZE': '1000',
'APP_LOG_FILESIZE': 1000,
'LOGGER_NAME': 'test_logger_name',
}

Expand Down

1 comment on commit 99311ce

@akameron
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.