Skip to content

Commit

Permalink
Update existing test cases due to extra Errors
Browse files Browse the repository at this point in the history
  • Loading branch information
goodtune committed Jun 3, 2017
1 parent 568d004 commit ea21f07
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions tenant_schemas/tests/test_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ def test_tenant_apps_empty(self):
Error("TENANT_APPS is empty.",
hint="Maybe you don't need this app?",
id="tenant_schemas.E001"),
Error("You have INSTALLED_APPS that are not in either of "
"TENANT_APPS or SHARED_APPS",
hint=['dts_test_app']),
])

@override_settings(PG_EXTRA_SEARCH_PATHS=['public', 'demo1', 'demo2'])
Expand All @@ -100,11 +103,20 @@ def test_public_schema_on_extra_search_paths(self):
Critical("Do not include tenant schemas (demo1, demo2) on PG_EXTRA_SEARCH_PATHS."),
])

@override_settings(SHARED_APPS=())
@override_settings(SHARED_APPS=(), INSTALLED_APPS=(
'tenant_schemas',
'dts_test_app',
'django.contrib.contenttypes',
))
@modify_settings(TENANT_APPS={
'append': 'django.contrib.contenttypes',
})
def test_shared_apps_empty(self):
self.assertBestPractice([
Warning("SHARED_APPS is empty.",
id="tenant_schemas.W002"),
Warning("SHARED_APPS is empty.", id="tenant_schemas.W002"),
Error("You have INSTALLED_APPS that are not in either of "
"TENANT_APPS or SHARED_APPS",
hint=['tenant_schemas']),
])

@override_settings(TENANT_APPS=(
Expand Down

0 comments on commit ea21f07

Please sign in to comment.