mirror of
https://github.com/autistic-symposium/backend-and-orchestration-toolkit.git
synced 2025-07-31 10:39:09 -04:00
🧆 update readme:
This commit is contained in:
parent
60aae380b2
commit
4a5d6f56a6
245 changed files with 20300 additions and 6 deletions
0
lambda_function/sqs-sns_example/tests/routes/.gitkeep
Normal file
0
lambda_function/sqs-sns_example/tests/routes/.gitkeep
Normal file
32
lambda_function/sqs-sns_example/tests/routes/test_root.py
Normal file
32
lambda_function/sqs-sns_example/tests/routes/test_root.py
Normal file
|
@ -0,0 +1,32 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
""" Test Root service handler module for AWS Lambda function. """
|
||||
|
||||
import os
|
||||
import json
|
||||
import pytest
|
||||
|
||||
from lib.routes import root
|
||||
|
||||
fixtures_path = os.path.join(os.path.dirname(__file__), '..', 'fixtures')
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def sns_event_record():
|
||||
sns_event_record_path = os.path.join(fixtures_path, 'SNS_contract.json')
|
||||
with open(sns_event_record_path, 'r') as sns_event_record_json:
|
||||
return json.load(sns_event_record_json)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def context():
|
||||
return {}
|
||||
|
||||
|
||||
class TestHandler():
|
||||
def test_type_error_for_bad_params(self, context):
|
||||
try:
|
||||
root.handler('', context)
|
||||
except TypeError as e:
|
||||
pass
|
||||
else:
|
||||
self.fail('ExpectedException not raised')
|
Loading…
Add table
Add a link
Reference in a new issue