Skip to content

Commit

Permalink
Add test that schema_name with underscores can be created. Refs djang…
Browse files Browse the repository at this point in the history
…o-tenants#829

according to the description in django-tenants#829 Postgres will double quote
schema names which contain underscores.
  • Loading branch information
atodorov committed Apr 19, 2023
1 parent e1b2fe2 commit d303fc1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion django_tenants/tests/test_tenants.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,9 @@ def test_tenant_schema_creation_with_only_numbers_name(self):

def test_tenant_schema_creation_with_special_chars(self):
"""Tests using special characters in schema name."""
schema_names = ('test-hyphen', 'test@at', 'test`backtick')
schema_names = ('test-hyphen', 'test@at', 'test`backtick',
'will_be_double_quoted_by_postgres_bc_of_underscores',
)

Client = get_tenant_model()
for schema_name in schema_names:
Expand Down

0 comments on commit d303fc1

Please sign in to comment.