Skip to content

Commit

Permalink
Merge pull request django-guardian#58 from funkaoshi/lukaszb
Browse files Browse the repository at this point in the history
Fix 'broken' grappelli tests.
  • Loading branch information
lukaszb committed Dec 15, 2011
2 parents 85be6a9 + 66a9ce4 commit e83df73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions guardian/tests/admin_test.py
Expand Up @@ -353,7 +353,7 @@ def test_user_can_acces_owned_objects_only_unless_superuser(self):

class GrappelliGuardedModelAdminTests(TestCase):

org_settings = copy.copy(settings)
org_installed_apps = copy.copy(settings.INSTALLED_APPS)

def _get_gma(self, attrs=None, name=None, model=None):
"""
Expand All @@ -370,7 +370,7 @@ def setUp(self):
settings.INSTALLED_APPS = ['grappelli'] + list(settings.INSTALLED_APPS)

def tearDown(self):
globals()['settings'] = copy.copy(self.org_settings)
settings.INSTALLED_APPS = self.org_installed_apps

def test_get_obj_perms_manage_template(self):
gma = self._get_gma()
Expand Down

0 comments on commit e83df73

Please sign in to comment.