Skip to content

Commit 55d0cbb

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

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:
251251
cursor.execute(schema)
252+
# Set the schema search path because `database.sql` resets it
253+
cursor.execute(f"SET search_path = {schema_name}")

0 commit comments

Comments
 (0)