update comment
This commit is contained in:
@@ -5,6 +5,7 @@ from dataclasses import dataclass
|
||||
from http import HTTPMethod
|
||||
|
||||
import boto3
|
||||
import layercake.jsonl as jsonl
|
||||
import pytest
|
||||
from layercake.dynamodb import DynamoDBPersistenceLayer
|
||||
|
||||
@@ -123,10 +124,16 @@ def dynamodb_persistence_layer(dynamodb_client) -> DynamoDBPersistenceLayer:
|
||||
return DynamoDBPersistenceLayer(PYTEST_TABLE_NAME, dynamodb_client)
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def dynamodb_seeds(dynamodb_client):
|
||||
with jsonl.readlines('tests/seeds.jsonl') as lines:
|
||||
for line in lines:
|
||||
dynamodb_client.put_item(TableName=PYTEST_TABLE_NAME, Item=line)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_app(monkeypatch):
|
||||
monkeypatch.setattr('settings.ELASTIC_CONN', {'hosts': 'http://127.0.0.1:9200'})
|
||||
|
||||
import app
|
||||
|
||||
return app
|
||||
|
||||
Reference in New Issue
Block a user