From 24f36697ac556ca68ccd96f5ef22cb1053cabd1c Mon Sep 17 00:00:00 2001 From: Matt Coulter <1432881+nideveloper@users.noreply.github.com> Date: Sat, 9 Jan 2021 15:31:19 +0000 Subject: [PATCH] remove test folder --- the-big-fan/python/tests/__init__.py | 0 the-big-fan/python/tests/unit/__init__.py | 0 .../tests/unit/test_the_big_fan_stack.py | 49 ------------------- 3 files changed, 49 deletions(-) delete mode 100644 the-big-fan/python/tests/__init__.py delete mode 100644 the-big-fan/python/tests/unit/__init__.py delete mode 100644 the-big-fan/python/tests/unit/test_the_big_fan_stack.py diff --git a/the-big-fan/python/tests/__init__.py b/the-big-fan/python/tests/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/the-big-fan/python/tests/unit/__init__.py b/the-big-fan/python/tests/unit/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/the-big-fan/python/tests/unit/test_the_big_fan_stack.py b/the-big-fan/python/tests/unit/test_the_big_fan_stack.py deleted file mode 100644 index e798d922..00000000 --- a/the-big-fan/python/tests/unit/test_the_big_fan_stack.py +++ /dev/null @@ -1,49 +0,0 @@ -import json -import pytest - -from aws_cdk import core -from the_big_fan.the_big_fan_stack import TheBigFanStack - -#TODO: replace these with aws-cdk/assert(or similar testing framework) if a python implementation is released -def get_template(): - app = core.App() - TheBigFanStack(app, "MyTestStack") - return json.dumps(app.synth().get_stack("MyTestStack").template) - - -def test_sns_topic_created(): - assert("The Big Fan CDK Pattern Topic" in get_template()) - - -def test_statusCreated_subscriber_sqs_created(): - print(get_template()) - assert("BigFanTopicStatusCreatedSubscriberQueue" in get_template()) - -def test_anyOtherStatus_subscriber_sqs_created(): - assert("BigFanTopicAnyOtherStatusSubscriberQueue" in get_template()) - -def test_statusCreated_sns_message_subscription(): - assert('FilterPolicy": {"status": ["created"]}' in get_template()) - -def test_anyOtherStatus_sns_message_subscription(): - assert('"FilterPolicy": {"status": [{"anything-but": ["created"]}]}' in get_template()) - -def test_sqs_receiveMessage_iam_policy_created(): - assert(('"PolicyDocument": {' - '"Statement": [' - '{"Action": [' - '"sqs:ReceiveMessage", ' - '"sqs:ChangeMessageVisibility", ' - '"sqs:GetQueueUrl", ' - '"sqs:DeleteMessage", ' - '"sqs:GetQueueAttributes"], ' - '"Effect": "Allow"') in get_template()) - -def test_createdStatus_sqs_subscriber_lambda_created(): - assert('"Handler": "createdStatus.handler"' in get_template()) - -def test_anyOtherStatus_sqs_subscriber_lambda_created(): - assert('"Handler": "anyOtherStatus.handler"' in get_template()) - -def test_api_gateway_sendEvent_created(): - assert('"PathPart": "SendEvent"' in get_template())