Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Create test postgres databases with correct locale
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Apr 16, 2020
1 parent a141f41 commit ea8359b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,16 @@ def setupdb():
db_conn.autocommit = True
cur = db_conn.cursor()
cur.execute("DROP DATABASE IF EXISTS %s;" % (POSTGRES_BASE_DB,))
cur.execute("CREATE DATABASE %s;" % (POSTGRES_BASE_DB,))
cur.execute(
"""
CREATE DATABASE %s
ENCODING 'UTF8'
LC_COLLATE='C'
LC_CTYPE='C'
template=template0;
"""
% (POSTGRES_BASE_DB,)
)
cur.close()
db_conn.close()

Expand Down

0 comments on commit ea8359b

Please sign in to comment.