Skip to content

Commit

Permalink
Dynamo: took measures to avoid unittest error along to README.md of '…
Browse files Browse the repository at this point in the history
  • Loading branch information
siruku6 committed Dec 26, 2020
1 parent 9d8232c commit 4e722da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ env:
- AWS_ACCESS_KEY_ID=dummy-access-key
- AWS_SECRET_ACCESS_KEY=dummy-access-key-secret
- AWS_DEFAULT_REGION=us-east-2
- AWS_SECURITY_TOKEN='testing'
- AWS_SESSION_TOKEN='testing'
install:
- pip install -r requirements.txt
- pip install coverage
Expand Down
7 changes: 6 additions & 1 deletion tests/clients/test_dynamodb_accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ def init_endpoint():
del os.environ['DYNAMO_ENDPOINT']


@pytest.fixture(scope='module', autouse=True)
@pytest.fixture(scope='module', autouse=False)
def dynamo_client(table_name):
mock = mock_dynamodb2()
mock.start()

yield dn_accessor.DynamodbAccessor(table_name=table_name)

mock.stop()


@mock_dynamodb2
def test___init_table(dynamo_client, table_name):
Expand Down

0 comments on commit 4e722da

Please sign in to comment.