mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-31 03:56:42 +00:00
alternator-test: add 2 tables fixture
For some tests, more than 1 table is needed, so another fixture that provided two additional test tables is added. Message-Id: <75ae9de5cc1bca19594db1f0bc03260f83459380.1557402320.git.sarna@scylladb.com>
This commit is contained in:
committed by
Nadav Har'El
parent
b6dde25bcc
commit
dfbf4ffe0f
@@ -88,3 +88,16 @@ def test_table(dynamodb):
|
||||
# we create a test_table fixture, we'll choose a different table name
|
||||
# anyway.
|
||||
table.delete()
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def test_2_tables(dynamodb):
|
||||
tables = [create_test_table(dynamodb,
|
||||
KeySchema=[ { 'AttributeName': 'p', 'KeyType': 'HASH' },
|
||||
{ 'AttributeName': 'c', 'KeyType': 'RANGE' }
|
||||
],
|
||||
AttributeDefinitions=[
|
||||
{ 'AttributeName': 'p', 'AttributeType': 'S' },
|
||||
{ 'AttributeName': 'c', 'AttributeType': 'S' },
|
||||
]) for _ in range(2)]
|
||||
yield tables
|
||||
[table.delete() for table in tables]
|
||||
|
||||
Reference in New Issue
Block a user