Skip to content

Commit

Permalink
DIP-172 fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
akameron committed Mar 30, 2016
1 parent 6b5f905 commit b6e4bf9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/test_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def setUp(self):
self.app = flask.Flask(__name__)
self.config = {
'LOGGER_NAME': "test_logger_name",
'REMOTE_FILE': "test_remote_file",
'SFTP_BUFFER_SIZE': 1000,
}
self.job_mock = Mock()
Expand Down Expand Up @@ -61,7 +60,7 @@ def test__export_starting_new_job(self):

self.jobModel_mock.get.assert_called_once_with(self.config)
self.sftpProxy_mock.assert_called_once_with(paramiko, self.config, self.logging_mock)
self.sftp_mock.file.assert_called_once_with(self.config['REMOTE_FILE'], mode='w', bufsize=self.config['SFTP_BUFFER_SIZE'])
self.sftp_mock.file.assert_called_once_with(None, mode='w', bufsize=self.config['SFTP_BUFFER_SIZE'])
self.job_mock.start.assert_called_once_with()
self.threadexecutor_mock.submit.assert_called_once_with(
jobRunner, self.job_mock, self.writter_mock, self.config,
Expand All @@ -79,7 +78,7 @@ def test__export_job_already_started(self):

self.jobModel_mock.get.assert_called_once_with(self.config)
self.sftpProxy_mock.assert_called_once_with(paramiko, self.config, self.logging_mock)
self.sftp_mock.file.assert_called_once_with(self.config['REMOTE_FILE'], mode='w', bufsize=self.config['SFTP_BUFFER_SIZE'])
self.sftp_mock.file.assert_called_once_with(None, mode='w', bufsize=self.config['SFTP_BUFFER_SIZE'])
self.job_mock.start.assert_called_once_with()
self.threadexecutor_mock.submit.assert_not_called()
self.logging_mock.warning.assert_called_once_with("export job already running")
Expand Down

0 comments on commit b6e4bf9

Please sign in to comment.