def test_build_command_with_all_args(self):
        self.command = DockerCli112.BuildCommand("centos:7",
                                                 build_args=["arg1", "arg2"],
                                                 labels=["label1"],
                                                 pull=True,
                                                 remove=True,
                                                 tags=["1", "2", "3"],
                                                 quiet=True)

        self.typical_command_assertions("build", "centos:7",
                                        ["--build-arg", "arg1"],
                                        ["--build-arg", "arg2"],
                                        ["--label", "label1"], "--pull",
                                        "--rm", ["--tag", "1"], ["--tag", "2"],
                                        ["--tag", "3"], "--quiet")
    def test_build_command_unknown_arg(self, log):
        self.command = DockerCli112.BuildCommand("alpine:latest",
                                                 something_unknown=True)

        self.assertLog(log.records[-1], "ERROR", "called with unknown args")
        self.typical_command_assertions("build", "alpine:latest")
    def test_build_command(self):
        self.command = DockerCli112.BuildCommand("centos:7")

        self.typical_command_assertions("build", "centos:7")