All tests to green including integration, moved files into solution and deleted old test scene asset maps

This commit is contained in:
David Kydd 2018-10-10 12:30:47 +13:00
Родитель 5fd4098e82
Коммит 831301bec6
9 изменённых файлов: 120 добавлений и 78 удалений

Просмотреть файл

@ -98,6 +98,10 @@
<SubType>Code</SubType>
</Compile>
<Compile Include="package.py" />
<Compile Include="tests\data\modules\default.py" />
<Compile Include="tests\data\modules\render_module_a.py" />
<Compile Include="tests\data\modules\render_module_b.py" />
<Compile Include="tests\data\modules\render_module_c.py" />
<Compile Include="tests\test_assets.py">
<SubType>Code</SubType>
</Compile>
@ -134,7 +138,12 @@
<Folder Include="docs\" />
<Folder Include="docs\images\" />
<Folder Include="tests\" />
<Folder Include="tests\test_scene\" />
<Folder Include="tests\basic_test_scene\" />
<Folder Include="tests\data\modules\" />
<Folder Include="tests\json_data\" />
<Folder Include="tests\json_data\file_tests\" />
<Folder Include="tests\json_data\file_tests\sample_data\" />
<Folder Include="tests\data\" />
</ItemGroup>
<ItemGroup>
<Content Include="azure_batch_maya\icons\btn_background.png" />
@ -192,6 +201,28 @@
<Content Include="requirements.txt">
<SubType>Code</SubType>
</Content>
<Content Include="tests\basic_test_scene\asset_map.mel" />
<Content Include="tests\basic_test_scene\test_scene.mb" />
<Content Include="tests\basic_test_scene\workspace.mel" />
<Content Include="tests\data\azure_batch_test.ini" />
<Content Include="tests\data\empty.mb" />
<Content Include="tests\data\star.png" />
<Content Include="tests\json_data\batch-applicationTemplate-parameters.json" />
<Content Include="tests\json_data\batch-applicationTemplate-prohibitedApplicationTemplateInfo.json" />
<Content Include="tests\json_data\batch-applicationTemplate-prohibitedId.json" />
<Content Include="tests\json_data\batch-applicationTemplate-prohibitedPoolInfo.json" />
<Content Include="tests\json_data\batch-applicationTemplate-prohibitedPriority.json" />
<Content Include="tests\json_data\batch-applicationTemplate-static.json" />
<Content Include="tests\json_data\batch-applicationTemplate-unsupportedProperty.json" />
<Content Include="tests\json_data\batch-applicationTemplate-untypedParameter.json" />
<Content Include="tests\json_data\batch.job.parameters.json" />
<Content Include="tests\json_data\batch.job.parametricsweep.json" />
<Content Include="tests\json_data\batch.job.simple.json" />
<Content Include="tests\json_data\batch.pool.parameters.json" />
<Content Include="tests\json_data\batch.pool.simple.json" />
<Content Include="tests\json_data\file_tests\bar.bmp" />
<Content Include="tests\json_data\file_tests\foo.txt" />
<Content Include="tests\json_data\file_tests\sample_data\test.txt" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>

Просмотреть файл

@ -13,7 +13,6 @@ import sys
import traceback
import adal
import copy
import maya.utils
from Queue import Queue

Просмотреть файл

@ -9,14 +9,13 @@ import logging
import json
from Queue import Queue
try:
if sys.version_info >= (3, 3):
import unittest2 as unittest
except ImportError:
from unittest.mock import MagicMock
else:
import unittest
try:
from unittest import mock
except ImportError:
import mock
from mock import MagicMock
from azure import batch_extensions
@ -25,7 +24,6 @@ from assets import Asset, Assets, AzureBatchAssets
from exception import FileUploadException
from azurebatchutils import ProgressBar, ProcButton
class TestAsset(unittest.TestCase):
def setUp(self):
@ -39,8 +37,12 @@ class TestAsset(unittest.TestCase):
def test_asset_create(self):
test_asset = Asset(self.mock_file, "parent", "batch")
self.assertEqual(test_asset.label, " test_path")
self.assertEqual(test_asset.path, "\\my\\local\\test_path")
self.assertEqual(test_asset.note, "Can't find \\my\\local\\test_path")
expected_path = os.path.realpath(self.mock_file)
expected_directory = os.path.dirname(expected_path)
self.assertEqual(test_asset.path, expected_path)
self.assertEqual(test_asset.note, "Can't find " + expected_path)
self.assertFalse(test_asset.exists)
with mock.patch.object(os.path, 'exists') as exist:
@ -49,9 +51,9 @@ class TestAsset(unittest.TestCase):
exist.return_value = True
mod.return_value = 1453766301
test_asset = Asset(self.mock_file, "parent", "batch")
self.assertEqual(test_asset.note, "\\my\\local\\test_path")
self.assertEqual(test_asset.note, expected_path)
self.assertTrue(test_asset.exists)
self.assertEqual(test_asset.pathmap['\\my\\local']('Linux'), 'my/local')
self.assertTrue(test_asset.pathmap[expected_directory]('Linux').endswith('my/local'))
@mock.patch("assets.maya")
def test_asset_display(self, mock_api):
@ -209,15 +211,15 @@ class TestAsset(unittest.TestCase):
Asset.upload(self.mock_self, 0, prog, queue, "container")
self.mock_self.batch.file.upload.assert_called_with(
"/my/test/path/file.txt", "container", "my/test/path/file.txt", progress_callback=mock.ANY)
self.assertEqual(queue.qsize(), 7)
self.assertEqual(queue.qsize(), 6)
self.mock_self.batch.file.upload.side_effect = ValueError('boom')
Asset.upload(self.mock_self, 0, prog, queue, "container")
self.assertEqual(queue.qsize(), 13)
self.assertEqual(queue.qsize(), 11)
prog.done = True
Asset.upload(self.mock_self, 0, prog, queue, "container")
self.assertEqual(queue.qsize(), 14)
self.assertEqual(queue.qsize(), 12)
class TestAssets(unittest.TestCase):
@ -459,23 +461,22 @@ class TestAzureBatchAssets(unittest.TestCase):
mods = AzureBatchAssets._collect_modules(self.mock_self)
self.assertEqual(len(mods), 4)
@mock.patch("assets.AzureBatchRenderAssets")
@mock.patch("azurebatchutils.get_current_scene_renderer")
@mock.patch("assets.maya")
def test_batchassets_configure_renderer(self, mock_maya, mock_default):
mock_default.return_value = mock.Mock(render_engine = "default")
mock_maya.get_attr.return_value = "test_renderer"
def test_batchassets_configure_renderer(self, mock_maya, mock_renderer):
mock_renderer.return_value = "test_renderer"
renderer = mock.Mock(render_engine = "my_renderer")
self.mock_self.modules = [renderer, "test", None]
AzureBatchAssets._configure_renderer(self.mock_self)
self.assertEqual(self.mock_self.renderer, mock_default.return_value)
self.assertEqual(self.mock_self.renderer.render_engine, "Renderer_Default")
renderer = mock.Mock(render_engine = "test_renderer")
self.mock_self.modules.append(renderer)
AzureBatchAssets._configure_renderer(self.mock_self)
self.assertEqual(self.mock_self.renderer, renderer)
self.assertEqual(self.mock_self.renderer.render_engine, renderer.render_engine)
def test_batchassets_set_assets(self):
self.mock_self.renderer = mock.Mock()
@ -491,11 +492,13 @@ class TestAzureBatchAssets(unittest.TestCase):
assets = AzureBatchAssets.get_assets(self.mock_self)
self.assertEqual(assets, ["file1", "file2"])
@mock.patch("azurebatchutils.get_root_dir")
@mock.patch("assets.SYS_SEARCHPATHS")
@mock.patch("assets.maya")
def test_batchassets_set_searchpaths(self, mock_maya, mock_syspaths):
def test_batchassets_set_searchpaths(self, mock_maya, mock_syspaths, mock_utils):
mock_maya.file.return_value = "testscene.mb"
mock_maya.workspace.return_value = "/test/directory"
mock_utils.return_value = "/test/directory"
mock_syspaths = ["a", "b", "c"]
paths = AzureBatchAssets._set_searchpaths(self.mock_self)
self.assertEqual(sorted(paths), ["/test/directory", "/test/directory\\sourceimages", os.getcwd()])

Просмотреть файл

@ -5,8 +5,16 @@
import json
import os
import unittest
from mock import patch, Mock
import sys
if sys.version_info >= (3, 3):
import unittest2 as unittest
from unittest.mock import MagicMock
else:
import unittest
import mock
from mock import MagicMock
from msrest import Serializer, Deserializer
from azure.storage import CloudStorageAccount
@ -250,7 +258,7 @@ class TestBatchExtensions(unittest.TestCase):
self.assertFalse('[parameters(' in json.dumps(resolved))
def test_batch_extensions_replace_parametric_sweep_command(self):
test_input = Mock(value="cmd {{{0}}}.mp3 {1}.mp3")
test_input = MagicMock(value="cmd {{{0}}}.mp3 {1}.mp3")
template_utils._replacement_transform(template_utils._transform_sweep_str, # pylint:disable=protected-access
test_input, "value", [5, 10])
self.assertEqual(test_input.value, 'cmd {5}.mp3 10.mp3')
@ -299,7 +307,7 @@ class TestBatchExtensions(unittest.TestCase):
def test_batch_extensions_replace_invalid_parametric_sweep(self):
test_input = Mock(value="cmd {0}.mp3 {2}.mp3")
test_input = MagicMock(value="cmd {0}.mp3 {2}.mp3")
with self.assertRaises(ValueError):
template_utils._replacement_transform(template_utils._transform_sweep_str, # pylint:disable=protected-access
test_input, "value", [5, 10])
@ -327,7 +335,7 @@ class TestBatchExtensions(unittest.TestCase):
"fileName": "blob.ext",
"fileNameWithoutExtension": "blob"
}
test_input = Mock(value="cmd {{{url}}}.mp3 {filePath}.mp3")
test_input = MagicMock(value="cmd {{{url}}}.mp3 {filePath}.mp3")
template_utils._replacement_transform(template_utils._transform_file_str, # pylint:disable=protected-access
test_input, "value", file_info)
self.assertEqual(test_input.value,
@ -359,7 +367,7 @@ class TestBatchExtensions(unittest.TestCase):
"fileName": "blob.ext",
"fileNameWithoutExtension": "blob"
}
test_input = Mock(value="cmd {url}.mp3 {fullNameWithSome}.mp3")
test_input = MagicMock(value="cmd {url}.mp3 {fullNameWithSome}.mp3")
with self.assertRaises(ValueError):
template_utils._replacement_transform(template_utils._transform_file_str, # pylint:disable=protected-access
test_input, "value", file_info)
@ -406,27 +414,27 @@ class TestBatchExtensions(unittest.TestCase):
with self.assertRaises(ValueError):
template_utils._parse_parameter_sets([]) # pylint:disable=protected-access
with self.assertRaises(ValueError):
template_utils._parse_parameter_sets([Mock(start=2, end=1, step=1)]) # pylint:disable=protected-access
template_utils._parse_parameter_sets([MagicMock(start=2, end=1, step=1)]) # pylint:disable=protected-access
with self.assertRaises(ValueError):
models.ParameterSet(start=2, end=1)
with self.assertRaises(ValueError):
template_utils._parse_parameter_sets([Mock(start=1, end=3, step=-1)]) # pylint:disable=protected-access
template_utils._parse_parameter_sets([MagicMock(start=1, end=3, step=-1)]) # pylint:disable=protected-access
with self.assertRaises(ValueError):
models.ParameterSet(start=1, end=3, step=-1)
with self.assertRaises(ValueError):
template_utils._parse_parameter_sets([Mock(start=1, end=3, step=0)]) # pylint:disable=protected-access
template_utils._parse_parameter_sets([MagicMock(start=1, end=3, step=0)]) # pylint:disable=protected-access
with self.assertRaises(ValueError):
models.ParameterSet(start=1, end=3, step=0)
with self.assertRaises(ValueError):
template_utils._parse_parameter_sets([Mock(start=None, end=3, step=1)]) # pylint:disable=protected-access
template_utils._parse_parameter_sets([MagicMock(start=None, end=3, step=1)]) # pylint:disable=protected-access
with self.assertRaises(ValueError):
models.ParameterSet(start=None, end=3, step=1)
with self.assertRaises(ValueError):
template_utils._parse_parameter_sets([Mock(start=3, end=None, step=1)]) # pylint:disable=protected-access
template_utils._parse_parameter_sets([MagicMock(start=3, end=None, step=1)]) # pylint:disable=protected-access
with self.assertRaises(ValueError):
models.ParameterSet(start=3, end=None, step=1)
with self.assertRaises(ValueError):
template_utils._parse_parameter_sets([Mock(start=1, end=2, step=1), Mock(start=None, end=None, step=1)]) # pylint:disable=protected-access
template_utils._parse_parameter_sets([MagicMock(start=1, end=2, step=1), MagicMock(start=None, end=None, step=1)]) # pylint:disable=protected-access
with self.assertRaises(ValueError):
models.ParameterSet(start=None, end=None)
@ -571,9 +579,9 @@ class TestBatchExtensions(unittest.TestCase):
def test_batch_extensions_parse_invalid_parametricsweep(self):
with self.assertRaises(ValueError):
template_utils._expand_parametric_sweep(Mock(parameter_sets=None, repeat_task=models.RepeatTask('cmd {0}.mp3'))) # pylint: disable=protected-access
template_utils._expand_parametric_sweep(MagicMock(parameter_sets=None, repeat_task=models.RepeatTask('cmd {0}.mp3'))) # pylint: disable=protected-access
with self.assertRaises(ValueError):
template_utils._expand_parametric_sweep(Mock(parameter_sets=[models.ParameterSet(1, 3)], repeat_task=None)) # pylint: disable=protected-access
template_utils._expand_parametric_sweep(MagicMock(parameter_sets=[models.ParameterSet(1, 3)], repeat_task=None)) # pylint: disable=protected-access
template = models.ParametricSweepTaskFactory(
parameter_sets=[
models.ParameterSet(1, 3)
@ -612,23 +620,23 @@ class TestBatchExtensions(unittest.TestCase):
def test_batch_extensions_preserve_resourcefiles(self):
fileutils = file_utils.FileUtils(None)
request = Mock(
request = MagicMock(
resource_files=[
Mock(
MagicMock(
blob_source='abc',
file_path='xyz')
])
transformed = template_utils.post_processing(request, fileutils, pool_utils.PoolOperatingSystemFlavor.LINUX)
self.assertEqual(transformed, request)
request = Mock(
request = MagicMock(
common_resource_files=[
Mock(
MagicMock(
blob_source='abc',
file_path='xyz')
],
job_manager_task=Mock(
job_manager_task=MagicMock(
resource_files=[
Mock(
MagicMock(
blob_source='foo',
file_path='bar')
]
@ -637,12 +645,12 @@ class TestBatchExtensions(unittest.TestCase):
transformed = template_utils.post_processing(request, fileutils, pool_utils.PoolOperatingSystemFlavor.WINDOWS)
self.assertEqual(transformed, request)
request = [ # pylint: disable=redefined-variable-type
Mock(resource_files=[Mock(blob_source='abc', file_path='xyz')]),
Mock(resource_files=[Mock(blob_source='abc', file_path='xyz')])
MagicMock(resource_files=[MagicMock(blob_source='abc', file_path='xyz')]),
MagicMock(resource_files=[MagicMock(blob_source='abc', file_path='xyz')])
]
transformed = template_utils.post_processing(request, fileutils, pool_utils.PoolOperatingSystemFlavor.WINDOWS)
self.assertEqual(transformed, request)
request = Mock(resource_files=[Mock(blob_source='abc', file_path=None)])
request = MagicMock(resource_files=[MagicMock(blob_source='abc', file_path=None)])
with self.assertRaises(ValueError):
template_utils.post_processing(request, fileutils, pool_utils.PoolOperatingSystemFlavor.WINDOWS)
@ -821,7 +829,7 @@ class TestBatchExtensions(unittest.TestCase):
self.assertEqual(len(pool.start_task.resource_files), 1)
def test_batch_extensions_packagemanager_taskfactory(self):
job = Mock(
job = MagicMock(
job_preparation_task=None,
task_factory=models.ParametricSweepTaskFactory(
parameter_sets=[models.ParameterSet(1, 2), models.ParameterSet(3, 5)],
@ -850,7 +858,7 @@ class TestBatchExtensions(unittest.TestCase):
self.assertEqual(job.job_preparation_task.wait_for_success, True)
def test_batch_extensions_starttask_without_packagemanager(self):
job = Mock(
job = MagicMock(
job_preparation_task=None,
task_factory=models.ParametricSweepTaskFactory(
parameter_sets=[models.ParameterSet(1, 2), models.ParameterSet(3, 5)],

Просмотреть файл

@ -10,10 +10,13 @@ import time
import uuid
import ConfigParser
try:
from unittest import mock
except ImportError:
if sys.version_info >= (3, 3):
import unittest2 as unittest
from unittest.mock import MagicMock
else:
import unittest
import mock
from mock import MagicMock
from environment import BATCH_POOL_IMAGES
import azurebatchutils as utils
@ -24,7 +27,7 @@ from azure.batch_extensions import models
from azure.batch.batch_auth import SharedKeyCredentials
from azure.storage.blob.blockblobservice import BlockBlobService
POOL_ID = "Maya_Pool_766c5218-a5a7-424d-9868-aebb43f98627" # The OS of the pool will determine whether the job is run with the linux or windows templates.
POOL_ID = "Maya_Pool_b7e4ae91-3c41-4237-bd0e-a66bfa2b2e23" # The OS of the pool will determine whether the job is run with the linux or windows templates.
scriptDir = os.path.dirname(__file__)
@ -88,7 +91,7 @@ if __name__ == '__main__':
batch_parameters = {'id': job_id}
batch_parameters['displayName'] = "Maya Integration Test using {}".format(os_flavor)
batch_parameters['metadata'] = [{"name": "JobType", "value": "Maya"}]
template_file = os.path.join(TEMPLATE_DIR, 'mayaSoftware-basic-{}.json'.format(os_flavor.lower()))
template_file = os.path.join(TEMPLATE_DIR, 'mayaSoftware-2017-{}.json'.format(os_flavor.lower()))
batch_parameters['applicationTemplateInfo'] = {'filePath': template_file}
application_params = {}
batch_parameters['applicationTemplateInfo']['parameters'] = application_params

Просмотреть файл

@ -63,8 +63,8 @@ class AzureTestBatchPools(unittest.TestCase):
self.mock_self._call = lambda x: [pool1, pool2]
ids = AzureBatchPools.list_pools(self.mock_self)
self.assertEqual(ids, [])
self.assertEqual(len(self.mock_self.pools), 0)
self.assertEqual(ids, ["67890", "12345"])
self.assertEqual(len(self.mock_self.pools), 2)
pool1.id = "Maya_Pool_A"
pool1.virtual_machine_configuration.image_reference.publisher = "batch"
@ -212,8 +212,15 @@ class AzureTestBatchPools(unittest.TestCase):
self.mock_self._call = call
self.mock_self.environment.get_application_licenses.return_value = ['maya']
self.mock_self.environment.get_image.return_value = {
'publisher': 'foo', 'sku': 'bar', 'offer': 'baz', 'node_sku_id':'sku_id'}
image_ref = mock.create_autospec(models.ImageReference)
image_ref.publisher = 'foo'
vm_config = mock.create_autospec(models.VirtualMachineConfiguration)
vm_config.image_reference = image_ref
vm_config.node_agent_sku_id = 'sku_id'
self.mock_self.environment.build_virtualmachineconfiguration.return_value = vm_config
AzureBatchPools.create_pool(self.mock_self, (3, 5), "test job")
self.mock_self.batch.pool.add.assert_called_with(mock.ANY)

Просмотреть файл

@ -1,8 +0,0 @@
global proc renderPrep()
{
dirmap -en true;
dirmap -m "C:\\Users\\antisch\\Documents\\maya\\projects\\juggernaut\\sourceimages" "/X/C/Users/antisch/Documents/maya/projects/juggernaut/sourceimages";
dirmap -m "C:\\Users\\antisch\\Documents\\maya\\projects\\juggernaut\\scenes" "/X/C/Users/antisch/Documents/maya/projects/juggernaut/scenes";
dirmap -m "H:/hsm/vault/hdr" "/X/C/Users/antisch/Documents/maya/projects/juggernaut/sourceimages";
dirmap -m "P:/hsm/asset/character/juggernaut/lookdev/sourceimages" "/X/C/Users/antisch/Documents/maya/projects/juggernaut/sourceimages";
}

Просмотреть файл

@ -1,8 +0,0 @@
global proc renderPrep()
{
dirmap -en true;
dirmap -m "C:\\Users\\antisch\\Documents\\maya\\projects\\juggernaut\\sourceimages" "X:\\C\\Users\\antisch\\Documents\\maya\\projects\\juggernaut\\sourceimages";
dirmap -m "C:\\Users\\antisch\\Documents\\maya\\projects\\juggernaut\\scenes" "X:\\C\\Users\\antisch\\Documents\\maya\\projects\\juggernaut\\scenes";
dirmap -m "H:/hsm/vault/hdr" "X:\\C\\Users\\antisch\\Documents\\maya\\projects\\juggernaut\\sourceimages";
dirmap -m "P:/hsm/asset/character/juggernaut/lookdev/sourceimages" "X:\\C\\Users\\antisch\\Documents\\maya\\projects\\juggernaut\\sourceimages";
}

Просмотреть файл

@ -16,6 +16,7 @@ try:
except ImportError:
import mock
import azurebatchutils
from azurebatchutils import ProgressBar
from ui_submission import SubmissionUI
from ui_shared import AzureBatchUI
@ -94,11 +95,13 @@ class TestBatchSubmission(unittest.TestCase):
mods = AzureBatchSubmission._collect_modules(self.mock_self)
self.assertEqual(len(mods), 4)
@mock.patch("submission.utils")
@mock.patch("submission.AzureBatchRenderJob")
@mock.patch("submission.maya")
def test_submission_configure_renderer(self, mock_maya, mock_default):
def test_submission_configure_renderer(self, mock_maya, mock_default, mock_utils):
mock_default.return_value = mock.Mock(render_engine = "default")
mock_maya.get_attr.return_value = "test_renderer"
mock_utils.get_current_scene_renderer.return_value = ""
renderer = mock.Mock(render_engine = "my_renderer")
self.mock_self.modules = [renderer, "test", None]
@ -109,6 +112,7 @@ class TestBatchSubmission(unittest.TestCase):
renderer = mock.Mock(render_engine = "test_renderer")
self.mock_self.modules.append(renderer)
mock_utils.get_current_scene_renderer.return_value = "test_renderer"
AzureBatchSubmission._configure_renderer(self.mock_self)
self.assertEqual(self.mock_self.renderer.render_engine, "test_renderer")
@ -138,6 +142,7 @@ class TestBatchSubmission(unittest.TestCase):
mock_prog.is_cancelled.return_value = False
mock_utils.ProgressBar.return_value = mock_prog
mock_utils.format_scene_path.return_value = "test_file_path"
mock_utils.build_template_filename.side_effect = azurebatchutils.build_template_filename
self.mock_self._configure_pool = lambda t: AzureBatchSubmission._configure_pool(self.mock_self, t)
self.mock_self._submit_threads = lambda: 6
self.mock_self._check_plugins.return_value = []
@ -149,12 +154,14 @@ class TestBatchSubmission(unittest.TestCase):
self.mock_self.renderer.get_jobdata.return_value = ("a", "b")
self.mock_self.renderer.get_params.return_value = {"foo": "bar"}
self.mock_self.renderer.get_title.return_value = "job name"
self.mock_self._get_task_container_image.return_value = "containerImage"
self.mock_self._call = call
mock_job = mock.create_autospec(models.ExtendedJobParameter)
self.mock_self.batch.job.jobparameter_from_json.return_value = mock_job
self.mock_self.asset_manager.upload.return_value = ("files", "maps", "thumbs", "workspace", mock_prog)
self.mock_self.asset_manager.upload.return_value = ({"project":"files", "path_map":"maps", "thumb_script":"thumbs", "workspace":"workspace"}, mock_prog)
self.mock_self.asset_manager.generate_sas_token.return_value = "0123456789ABCDEF"
self.mock_self.batch.threads = 6
mock_maya.about.return_value = "2017"
self.mock_self.ui.get_pool.return_value = {1: (4, 4)}
AzureBatchSubmission.submit(self.mock_self)
@ -168,9 +175,9 @@ class TestBatchSubmission(unittest.TestCase):
'displayName': 'job name',
'id': mock.ANY,
'applicationTemplateInfo': {
'parameters': {'sceneFile': 'test_file_path', 'outputs': mock.ANY, 'assetScript': 'maps', 'foo': 'bar',
'parameters': {'taskContainerImageName' : 'containerImage', 'sceneFile': 'test_file_path', 'outputs': mock.ANY, 'assetScript': 'maps', 'foo': 'bar',
'projectData': 'files', 'thumbScript': 'thumbs', 'storageURL': '0123456789ABCDEF', 'workspace': 'workspace'},
'filePath': os.path.join(os.environ['AZUREBATCH_TEMPLATES'], 'arnold-basic-windows.json')},
'filePath': os.path.join(os.environ['AZUREBATCH_TEMPLATES'], 'containers', 'arnold-2017-windows.json')},
'metadata': [{'name': 'JobType', 'value': 'Maya'}]})
@ -185,9 +192,9 @@ class TestBatchSubmission(unittest.TestCase):
'displayName': 'job name',
'id': mock.ANY,
'applicationTemplateInfo': {
'parameters': {'sceneFile': 'test_file_path', 'outputs': mock.ANY, 'assetScript': 'maps', 'foo': 'bar',
'parameters': {'taskContainerImageName' : 'containerImage','sceneFile': 'test_file_path', 'outputs': mock.ANY, 'assetScript': 'maps', 'foo': 'bar',
'projectData': 'files', 'thumbScript': 'thumbs', 'storageURL': '0123456789ABCDEF', 'workspace': 'workspace'},
'filePath': os.path.join(os.environ['AZUREBATCH_TEMPLATES'], 'arnold-basic-windows.json')},
'filePath': os.path.join(os.environ['AZUREBATCH_TEMPLATES'], 'containers', 'arnold-2017-windows.json')},
'metadata': [{'name': 'JobType', 'value': 'Maya'}]})