MCPcopy Create free account
hub / github.com/ExtendDB/extenddb / populated_table

Method populated_table

tests/test_import_export.py:90–107  ·  view source on GitHub ↗

Create and populate a table for export tests.

(self, dynamodb_client, unique_table_name, cleanup_table)

Source from the content-addressed store, hash-verified

88
89 @pytest.fixture()
90 def populated_table(self, dynamodb_client, unique_table_name, cleanup_table):
91 """Create and populate a table for export tests."""
92 name = unique_table_name
93 cleanup_table(name)
94 dynamodb_client.create_table(
95 TableName=name,
96 AttributeDefinitions=[{"AttributeName": "pk", "AttributeType": "S"}],
97 KeySchema=[{"AttributeName": "pk", "KeyType": "HASH"}],
98 BillingMode="PAY_PER_REQUEST",
99 )
100 wait_for_active(dynamodb_client, name)
101
102 for i in range(5):
103 dynamodb_client.put_item(
104 TableName=name,
105 Item={"pk": {"S": f"item-{i}"}, "data": {"S": f"value-{i}"}},
106 )
107 return name
108
109 def test_export_dynamodb_json(self, dynamodb_client, populated_table):
110 """Export table to DYNAMODB_JSON format."""

Callers

nothing calls this directly

Calls 4

wait_for_activeFunction · 0.90
cleanup_tableFunction · 0.85
create_tableMethod · 0.80
put_itemMethod · 0.80

Tested by

no test coverage detected