-
-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #913 from kobotoolbox/remove-sites
Remove sites framework
- Loading branch information
Showing
5 changed files
with
7 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,10 @@ | ||
# coding: utf-8 | ||
from django.conf import settings | ||
from django.test import TestCase | ||
from django.test import override_settings, TestCase | ||
from onadata.apps.main.context_processors import site_name | ||
|
||
|
||
class CustomContextProcessorsTest(TestCase): | ||
@override_settings(KOBOCAT_PUBLIC_HOSTNAME="kc.kobotoolbox.org") | ||
def test_site_name(self): | ||
context = site_name(None) | ||
self.assertEqual(context, {'SITE_NAME': 'example.com'}) | ||
restore_site_id = settings.SITE_ID | ||
settings.SITE_ID = 100 | ||
context = site_name(None) | ||
self.assertEqual(context, {'SITE_NAME': 'example.org'}) | ||
settings.SITE_ID = restore_site_id | ||
self.assertEqual(context, {'SITE_NAME': 'kc.kobotoolbox.org'}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters