Skip to content

Commit f8806b0

Browse files
committed
Fixed: test_session.py to pass unit tests
1 parent b144cc0 commit f8806b0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/unit/test_session.py

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from mock import Mock, patch, call
1717
import sagemaker
1818
from sagemaker import s3_input, Session, get_execution_role
19+
import datetime
1920

2021
from botocore.exceptions import ClientError
2122

@@ -177,6 +178,11 @@ def test_s3_input_all_arguments():
177178
{'ModelArtifacts': {
178179
'S3ModelArtifacts': S3_OUTPUT + '/model/model.tar.gz'
179180
}})
181+
# TrainingStartTime and TrainingEndTime are for billable seconds calculation
182+
COMPLETED_DESCRIBE_JOB_RESULT.update(
183+
{'TrainingStartTime': datetime.datetime(2018, 2, 17, 7, 15, 0, 103000, tzinfo=tzlocal())})
184+
COMPLETED_DESCRIBE_JOB_RESULT.update(
185+
{'TrainingEndTime': datetime.datetime(2018, 2, 17, 7, 19, 34, 953000, tzinfo=tzlocal())})
180186
IN_PROGRESS_DESCRIBE_JOB_RESULT = dict(DEFAULT_EXPECTED_TRAIN_JOB_ARGS)
181187
IN_PROGRESS_DESCRIBE_JOB_RESULT.update({'TrainingJobStatus': 'InProgress'})
182188

0 commit comments

Comments
 (0)