@@ -0,0 +1,2548 @@
+# -*- coding: utf-8 -*-%0Afrom __future__ import absolute_import, division, print_function%0A%0Afrom mock import patch%0A%0Afrom polyaxon_cli.cli.build import build%0Afrom tests.test_cli.utils import BaseCommandTestCase%0A%0A%0Aclass TestBuild(BaseCommandTestCase):%0A%0A    @patch('polyaxon_client.api.build_job.BuildJobApi.get_build')%0A    @patch('polyaxon_cli.managers.project.ProjectManager.is_initialized')%0A    @patch('polyaxon_cli.managers.build_job.BuildJobManager.set_config')%0A    @patch('polyaxon_cli.cli.build.get_build_details')%0A    def test_get_build(self,%0A                       get_build_details,%0A                       set_config,%0A                       is_initialized,%0A                       get_build):%0A        self.runner.invoke(build, %5B'--project=admin/foo', '--build=1', 'get'%5D)%0A        assert get_build.call_count == 1%0A        assert set_config.call_count == 1%0A        assert is_initialized.call_count == 1%0A        assert get_build_details.call_count == 1%0A%0A    @patch('polyaxon_client.api.build_job.BuildJobApi.update_build')%0A    def test_update_build(self, update_build):%0A        self.runner.invoke(build, %5B'update'%5D)%0A        assert update_build.call_count == 0%0A%0A        self.runner.invoke(build, %5B'--project=admin/foo',%0A                                   '--build=1',%0A                                   'update',%0A                                   '--description=foo'%5D)%0A        assert update_build.call_count == 1%0A%0A    @patch('polyaxon_client.api.build_job.BuildJobApi.stop')%0A    def test_stop_build(self, stop):%0A        self.runner.invoke(build, %5B'stop'%5D)%0A        assert stop.call_count == 0%0A%0A        self.runner.invoke(build, %5B'--project=admin/foo',%0A                                   '--build=1',%0A                                   'stop',%0A                                   '-y'%5D)%0A        assert stop.call_count == 1%0A%0A    @patch('polyaxon_client.api.build_job.BuildJobApi.get_statuses')%0A    def test_build_statuses(self, get_statuses):%0A        self.runner.invoke(build, %5B'--project=admin/foo', '--build=1', 'statuses'%5D)%0A        assert get_statuses.call_count == 1%0A%0A    @patch('polyaxon_client.api.build_job.BuildJobApi.bookmark')%0A    def test_build_bookmark(self, bookmark):%0A        self.runner.invoke(build, %5B'--project=admin/foo', '--build=1', 'bookmark'%5D)%0A        assert bookmark.call_count == 1%0A%0A    @patch('polyaxon_client.api.build_job.BuildJobApi.unbookmark')%0A    def test_build_unbookmark(self, unbookmark):%0A        self.runner.invoke(build, %5B'--project=admin/foo', '--build=1', 'unbookmark'%5D)%0A        assert unbookmark.call_count == 1%0A

Add build cli tests