Skip to content

Instantly share code, notes, and snippets.

@dmitryTsatsarin
Created June 4, 2013 15:51
Show Gist options
  • Save dmitryTsatsarin/5707024 to your computer and use it in GitHub Desktop.
Save dmitryTsatsarin/5707024 to your computer and use it in GitHub Desktop.
override_settings
from django.test import TestCase
from django.conf import settings
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
"""
with self.settings(NAME='Tim'):
self.assertEqual(settings.NAME, 'Tim')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment