Skip to content

Commit

Permalink
adding unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eamonnfaherty committed Sep 1, 2022
1 parent e2b211e commit c66fe5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from unittest import skip
from unittest import skip, mock
from servicecatalog_puppet.workflow import tasks_unit_tests_helper


Expand Down Expand Up @@ -43,12 +43,12 @@ def test_params_for_results_display(self):
# verify
self.assertEqual(expected_result, actual_result)

@skip
def test_api_calls_used(self):
# setup
self.sut.get_account_used = mock.MagicMock(name="get_account_used")
expected_result = [
f"codebuild.start_build_{self.get_account_used()}_{self.project_name}",
f"codebuild.batch_get_projects_{self.get_account_used()}_{self.project_name}",
f"codebuild.start_build_{self.sut.get_account_used()}_{self.project_name}",
f"codebuild.batch_get_projects_{self.sut.get_account_used()}_{self.project_name}",
]

# exercise
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from unittest import skip
from unittest import skip, mock
from servicecatalog_puppet.workflow import tasks_unit_tests_helper


Expand Down Expand Up @@ -47,11 +47,11 @@ def test_params_for_results_display(self):
# verify
self.assertEqual(expected_result, actual_result)

@skip
def test_api_calls_used(self):
# setup
self.sut.get_account_used = mock.MagicMock(name="get_account_used")
expected_result = {
f"lambda.invoke_{self.get_account_used()}_{self.region}": 1,
f"lambda.invoke_{self.sut.get_account_used()}_{self.region}": 1,
}

# exercise
Expand Down

0 comments on commit c66fe5e

Please sign in to comment.