-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
87b046f
commit 14e6d8c
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
servicecatalog_puppet/workflow/apps/provision_app_task_test.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
from unittest import TestCase | ||
|
||
|
||
class TestProvisionAppTask(TestCase): | ||
cache_invalidator = 'NOW' | ||
account_id = 'account_id' | ||
region = "region" | ||
app_name = 'app' | ||
puppet_account_id = 'pupp' | ||
task_reference = 'task_reference' | ||
manifest_task_reference_file_path = "manifest_task_reference_file_path" | ||
dependencies_by_reference = [] | ||
|
||
bucket = 'bucket' | ||
key = 'key' | ||
version_id = 'version_id' | ||
execution = 'execution' | ||
|
||
def setUp(self) -> None: | ||
from servicecatalog_puppet.workflow.apps import provision_app_task | ||
self.sut = provision_app_task.ProvisionAppTask( | ||
task_reference=self.task_reference, | ||
puppet_account_id=self.puppet_account_id, | ||
app_name=self.app_name, | ||
region=self.region, | ||
account_id=self.account_id, | ||
manifest_task_reference_file_path=self.manifest_task_reference_file_path, | ||
dependencies_by_reference=self.dependencies_by_reference, | ||
bucket=self.bucket, | ||
key=self.key, | ||
version_id=self.version_id, | ||
execution=self.execution, | ||
) | ||
|
||
def test_params_for_results_display(self): | ||
# setup | ||
expected_results = { | ||
"task_reference": self.task_reference, | ||
"puppet_account_id": self.puppet_account_id, | ||
"app_name": self.app_name, | ||
"region": self.region, | ||
"account_id": self.account_id, | ||
"cache_invalidator": self.cache_invalidator, | ||
} | ||
|
||
# exercise | ||
actual_results = self.sut.params_for_results_display() | ||
|
||
self.assertEqual(expected_results, actual_results) |