コード例 #1
0
    def test_register(self, mock_register_cluster, mock_create_project, mock_list_clusters_info) -> None:
        cluster_group = ClusterGroup(
            clusters=[self.cluster],
            cluster_repository=self.cluster_repository,
            project_repository=self.project_repository
        )

        cluster_group.register()

        self.assertTrue(mock_register_cluster.called)
        self.assertTrue(mock_list_clusters_info.called)
        self.assertTrue(mock_create_project.called)
コード例 #2
0
    def test_register(self, mock_register_cluster, mock_create_project) -> None:
        cluster_group = ClusterGroup(
            clusters=[self.cluster],
            cluster_repository=self.cluster_repository,
            project_repository=self.project_repository
        )

        cluster_group.register()

        self.assertTrue(mock_register_cluster.called)
        self.assertEqual(mock_register_cluster.call_args[0][0], self.cluster)
        self.assertTrue(mock_create_project.called)
        self.assertEqual(mock_create_project.call_args[0][0], self.cluster)