From 525ef8e0df8376feafcfbdf4bb83e8767af12e1d Mon Sep 17 00:00:00 2001 From: Stanislav Zubov Date: Mon, 11 Jan 2016 16:56:10 +0600 Subject: [PATCH] fix_codestyle --- tests/unit/helpers.py | 4 ++-- vmmaster/api/helpers.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/unit/helpers.py b/tests/unit/helpers.py index 4fe75a67..578e9096 100644 --- a/tests/unit/helpers.py +++ b/tests/unit/helpers.py @@ -8,6 +8,7 @@ import socket import unittest +from nose.twistedtools import reactor from mock import Mock, patch @@ -225,10 +226,9 @@ def vmmaster_server_mock(port): 'core.sessions.SessionWorker', Mock() ): from vmmaster.server import VMMasterServer - from nose.twistedtools import reactor return VMMasterServer(reactor, port) def request_mock(**kwargs): time.sleep(2) - return Mock(status_code=200, headers={}, content=json.dumps({'status': 0})) \ No newline at end of file + return Mock(status_code=200, headers={}, content=json.dumps({'status': 0})) diff --git a/vmmaster/api/helpers.py b/vmmaster/api/helpers.py index 1770dfcc..dbd90093 100644 --- a/vmmaster/api/helpers.py +++ b/vmmaster/api/helpers.py @@ -45,11 +45,11 @@ def get_screenshots(session_id, log_step_id=None): screenshots = [] if log_step_id: - session_steps = [current_app.database.get_step_by_id(log_step_id)] + steps = [current_app.database.get_step_by_id(log_step_id)] else: - session_steps = current_app.database.get_log_steps_for_session(session_id) + steps = current_app.database.get_log_steps_for_session(session_id) - for log_step in session_steps: + for log_step in steps: if log_step.screenshot: screenshots.append(log_step.screenshot)