Skip to content

Commit 330a0a5

Browse files
committed
Add schema search path setting in initialize_schema function in tests
1 parent 896390c commit 330a0a5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/helpers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,11 @@ def dummy_verified_contract():
243243
return VerifiedContract.dummy()
244244

245245

246-
def initialize_schema(connection):
246+
def initialize_schema(connection, schema_name="public"):
247247
with open('./database.sql', 'r') as schema_file:
248248
schema = schema_file.read()
249249

250250
with connection.cursor() as cursor:
251+
# Set the schema search path
252+
cursor.execute(f"SET search_path = {schema_name}")
251253
cursor.execute(schema)

0 commit comments

Comments
 (0)