def test_GetOutputDir_TimestampIsNoneCustomPrefix_ReturnsNoTimestampCustomPrefix( self, mock_join): test_prefix = "CustomPrefix" get_output_dir(None, test_prefix) mock_join.assert_called_with(test_prefix, "NO_TIMESTAMP")
def test_GetOutputDir_TimestampGivenCustomPrefix_ReturnsTimestampedDirCustomPrefix( self, mock_join): timestamp = datetime.datetime(2016, 1, 1, 12, 0, 0, 123456) test_prefix = "CustomPrefix" get_output_dir(timestamp, test_prefix) expected_timestamp = "2016-01-01T12_00_00_123456" mock_join.assert_called_with(test_prefix, expected_timestamp)
def test_GetOutputDir_TimestampGivenDefaultPrefix_ReturnsTimestampedDirDefaultPrefix( self, mock_join): prefix_dir = "TestResults" timestamp = datetime.datetime(2016, 1, 1, 12, 0, 0, 123456) get_output_dir(timestamp, prefix_dir) expected_timestamp = "2016-01-01T12_00_00_123456" mock_join.assert_called_with("TestResults", expected_timestamp)
def test_GetOutputDir_TimestampIsNoneDefaultPrefix_ReturnsNoTimestampDefaultPrefix( self, mock_join): prefix_dir = "TestResults" get_output_dir(None, prefix_dir) mock_join.assert_called_with(prefix_dir, "NO_TIMESTAMP")