add turborepo
This commit is contained in:
@@ -13,7 +13,7 @@ from layercake.dynamodb import DynamoDBPersistenceLayer, KeyPair
|
||||
|
||||
from boto3clients import dynamodb_client, s3_client
|
||||
from config import BUCKET_NAME, ENROLLMENT_TABLE
|
||||
from docseal import headers
|
||||
from docuseal import headers
|
||||
|
||||
logger = Logger(__name__)
|
||||
tracer = Tracer()
|
||||
|
||||
@@ -15,8 +15,8 @@ PAPERFORGE_API = 'https://paperforge.saladeaula.digital'
|
||||
CERT_REPORTING_URI = 's3://saladeaula.digital/certs/reporting.html'
|
||||
ESIGN_URI = 's3://saladeaula.digital/esigns/11de2510136adbac.pfx'
|
||||
|
||||
DOCSEAL_API = 'https://docs.eduseg.com.br'
|
||||
DOCSEAL_KEY: str = os.getenv('DOCSEAL_KEY') # type: ignore
|
||||
DOCUSEAL_API = 'https://docs.eduseg.com.br'
|
||||
DOCUSEAL_KEY: str = os.getenv('DOCUSEAL_KEY') # type: ignore
|
||||
|
||||
|
||||
DBNAME: str = os.getenv('POSTGRES_DB') # type: ignore
|
||||
|
||||
@@ -2,10 +2,10 @@ from typing import NotRequired, TypedDict
|
||||
|
||||
import requests
|
||||
|
||||
from config import DOCSEAL_API, DOCSEAL_KEY
|
||||
from config import DOCUSEAL_API, DOCUSEAL_KEY
|
||||
|
||||
headers = {
|
||||
'X-Auth-Token': DOCSEAL_KEY,
|
||||
'X-Auth-Token': DOCUSEAL_KEY,
|
||||
}
|
||||
|
||||
Submitter = TypedDict(
|
||||
@@ -34,7 +34,7 @@ def create_submission_from_pdf(
|
||||
**kwargs,
|
||||
):
|
||||
r = requests.post(
|
||||
url=f'{DOCSEAL_API}/api/submissions/pdf',
|
||||
url=f'{DOCUSEAL_API}/api/submissions/pdf',
|
||||
json={
|
||||
'name': filename,
|
||||
'documents': [
|
||||
@@ -12,7 +12,7 @@ from layercake.strutils import first_word
|
||||
|
||||
from boto3clients import dynamodb_client, s3_client
|
||||
from config import ENROLLMENT_TABLE
|
||||
from docseal import create_submission_from_pdf
|
||||
from docuseal import create_submission_from_pdf
|
||||
|
||||
logger = Logger(__name__)
|
||||
dyn = DynamoDBPersistenceLayer(ENROLLMENT_TABLE, dynamodb_client)
|
||||
|
||||
@@ -43,6 +43,7 @@ Globals:
|
||||
POSTGRES_PORT: 5432
|
||||
POSTGRES_USER: "{{resolve:ssm:/saladeaula/postgres_user}}"
|
||||
POSTGRES_PASSWORD: "{{resolve:ssm:/saladeaula/postgres_password}}"
|
||||
DOCUSEAL_KEY: "{{resolve:ssm:/saladeaula/docuseal_key}}"
|
||||
|
||||
Resources:
|
||||
EventLog:
|
||||
@@ -390,8 +391,10 @@ Resources:
|
||||
keys:
|
||||
sk: ["0"]
|
||||
new_image:
|
||||
status: [COMPLETED]
|
||||
cert:
|
||||
- exists: true
|
||||
s3_uri:
|
||||
- exists: true
|
||||
old_image:
|
||||
cert:
|
||||
- exists: false
|
||||
|
||||
@@ -17,7 +17,7 @@ def pytest_configure():
|
||||
os.environ['TZ'] = 'America/Sao_Paulo'
|
||||
os.environ['DYNAMODB_PARTITION_KEY'] = PK
|
||||
os.environ['DYNAMODB_SORT_KEY'] = SK
|
||||
os.environ['DOCSEAL_KEY'] = 'gUWhWtYBgTaP8fc1q5GZ6JuUHaZzMgZna6KFBHz3Gzk'
|
||||
os.environ['DOCUSEAL_KEY'] = 'gUWhWtYBgTaP8fc1q5GZ6JuUHaZzMgZna6KFBHz3Gzk'
|
||||
os.environ['USER_TABLE'] = PYTEST_TABLE_NAME
|
||||
os.environ['COURSE_TABLE'] = PYTEST_TABLE_NAME
|
||||
os.environ['ENROLLMENT_TABLE'] = PYTEST_TABLE_NAME
|
||||
|
||||
@@ -2,7 +2,7 @@ import base64
|
||||
import uuid
|
||||
from unittest.mock import patch
|
||||
|
||||
from docseal import create_submission_from_pdf
|
||||
from docuseal import create_submission_from_pdf
|
||||
|
||||
SUBJECT = '{first_name}, assine seu certificado agora!'
|
||||
MESSAGE = """
|
||||
@@ -18,7 +18,7 @@ def Response(*args, **kwargs):
|
||||
|
||||
|
||||
def test_create_submission_from_pdf():
|
||||
with patch('docseal.requests.post', Response):
|
||||
with patch('docuseal.requests.post', Response):
|
||||
with open('tests/sample.pdf', 'rb') as f:
|
||||
file = base64.b64encode(f.read())
|
||||
create_submission_from_pdf(
|
||||
Reference in New Issue
Block a user