def test_build_docker_cmd_boot_config(self, run_command_mock,
                                          process_check_mock, _):
        """Tests run_test with a bootconfig."""
        bootstrap = docker_bootstrap.Bootstrap(
            '/docker_folder',
            '/workspace',
            'test_config.yaml',
            bootstrap_config=
            'bootstrap/test_config/config_multi_mount_points.yaml',
            docker_tag='tf_test/framework',
            auth_token_dir='/test/auth_token')

        bootstrap.run_tests()
        # Assumes last call was to kick off the docker image.
        arg0 = run_command_mock.call_args[0][0]

        expected_docker_cmd = (
            'nvidia-docker run  --rm  '
            '-v /home/user/data/imagenet:/data/imagenet '
            '-v /home/user/data/cifar-10:/data/cifar-10 '
            '-v /test/auth_token:/auth_tokens '
            '-v /workspace:/workspace tf_test/framework python '
            '/workspace/git/benchmark_harness/oss_bench/harness/controller.py '
            '--workspace=/workspace --test-config=test_config.yaml '
            '--framework=tensorflow')

        self.assertEqual(arg0, expected_docker_cmd)
        process_check_mock.assert_called()
    def test_build_docker_cmd_mxnet(self, run_command_mock, process_check_mock,
                                    _):
        """Tests run_test with mxnet as the framework."""
        bootstrap = docker_bootstrap.Bootstrap(
            '/docker_folder',
            '/workspace',
            'test_config.yaml',
            framework='mxnet',
            docker_tag='tf_test/framework',
            auth_token_dir='/test/auth_token')

        bootstrap.run_tests()
        # Assumes last call was to kick off the docker image.
        arg0 = run_command_mock.call_args[0][0]
        self.assertEqual(
            arg0, 'nvidia-docker run  --rm  '
            '-v /test/auth_token:/auth_tokens -v /workspace:/workspace '
            'tf_test/framework python '
            '/workspace/git/benchmark_harness/oss_bench/harness/controller.py'
            ' --workspace=/workspace --test-config=test_config.yaml'
            ' --framework=mxnet')
        process_check_mock.assert_called()