Commits

Gustavo Picon  committed d8ae5bc

Removed unneeded conditionals since we always have auth available in the tests.

  • Participants
  • Parent commits cbecc9c

Comments (0)

Files changed (2)

File treebeard/tests/models.py

 
 MP_TestSortedNodeShortPath._meta.get_field('path').max_length = 4
 
-if 'django.contrib.auth' in settings.INSTALLED_APPS:
-    class MP_TestIssue14(MP_Node):
-        name = models.CharField(max_length=255)
-        users = models.ManyToManyField(User)
+class MP_TestIssue14(MP_Node):
+    name = models.CharField(max_length=255)
+    users = models.ManyToManyField(User)

File treebeard/tests/test_treebeard.py

 from treebeard.tests import models
 
 
-# ghetto app detection, there is probably some introspection method,
-# but meh, this works
-HAS_DJANGO_AUTH = 'django.contrib.auth' in settings.INSTALLED_APPS
-
 BASE_DATA = [
     {'data': {'desc': '1'}},
     {'data': {'desc': '2'}, 'children': [
     # test for http://code.google.com/p/django-treebeard/issues/detail?id=14
 
     def test_many_to_many_django_user_anonymous(self):
-        if not HAS_DJANGO_AUTH:  # pragma: no cover
-            self.fail('this test needs django.contrib.auth in INSTALLED_APPS')
-
         # Using AnonymousUser() in the querysets will expose non-treebeard
         # related problems in Django 1.0
         #