diff options
| author | Jordan Cook <jordan.cook@pioneer.com> | 2021-04-20 22:07:01 -0500 |
|---|---|---|
| committer | Jordan Cook <jordan.cook@pioneer.com> | 2021-04-20 22:11:31 -0500 |
| commit | bf09dcbe4422ae030a34275ef27066d3601e98ac (patch) | |
| tree | 9b8f42e4e283d6dd32b6aace567d4c4f1119e106 /tests/integration/test_dynamodb.py | |
| parent | ff25727eec93461ab507849810c45e97147bdd85 (diff) | |
| download | requests-cache-bf09dcbe4422ae030a34275ef27066d3601e98ac.tar.gz | |
Run multi-threaded tests for all backends, and run with more threads & iterations for merges to master
Diffstat (limited to 'tests/integration/test_dynamodb.py')
| -rw-r--r-- | tests/integration/test_dynamodb.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/tests/integration/test_dynamodb.py b/tests/integration/test_dynamodb.py index 13e40dd..3a4bd23 100644 --- a/tests/integration/test_dynamodb.py +++ b/tests/integration/test_dynamodb.py @@ -3,19 +3,12 @@ import unittest from unittest.mock import patch from requests_cache.backends import DynamoDbDict -from tests.conftest import fail_if_no_connection +from tests.conftest import AWS_OPTIONS, fail_if_no_connection from tests.integration.test_backends import BaseStorageTestCase # Run this test module last, since the DynamoDB container takes the longest to initialize pytestmark = pytest.mark.order(-1) -boto_options = { - 'endpoint_url': 'http://localhost:8000', - 'region_name': 'us-east-1', - 'aws_access_key_id': 'placeholder', - 'aws_secret_access_key': 'placeholder', -} - @pytest.fixture(scope='module', autouse=True) @fail_if_no_connection @@ -23,13 +16,13 @@ def ensure_connection(): """Fail all tests in this module if DynamoDB is not running""" import boto3 - client = boto3.client('dynamodb', **boto_options) + client = boto3.client('dynamodb', **AWS_OPTIONS) client.describe_limits() class DynamoDbDictWrapper(DynamoDbDict): def __init__(self, namespace, collection_name='dynamodb_dict_data', **options): - super().__init__(namespace, collection_name, **options, **boto_options) + super().__init__(namespace, collection_name, **options, **AWS_OPTIONS) class DynamoDbTestCase(BaseStorageTestCase, unittest.TestCase): |
