Ticket #18322: django-ticket18322.diff

File django-ticket18322.diff, 1.5 KB (added by Michael Manfre, 12 years ago)
  • django/contrib/sessions/tests.py

    diff --git a/django/contrib/sessions/tests.py b/django/contrib/sessions/tests.py
    index 92ea6bb..3de0978 100644
    a b from django.contrib.sessions.backends.signed_cookies import SessionStore as Cook  
    1313from django.contrib.sessions.models import Session
    1414from django.contrib.sessions.middleware import SessionMiddleware
    1515from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation
     16from django.db import connection
    1617from django.http import HttpResponse
    1718from django.test import TestCase, RequestFactory
    1819from django.test.utils import override_settings
    class DatabaseSessionTests(SessionTestsMixin, TestCase):  
    285286        del self.session._session_cache
    286287        self.assertEqual(self.session['y'], 2)
    287288
    288 
     289@unittest.skipIf(not connection.features.supports_timezones,
     290    "Database backend does not support timezones")
    289291@override_settings(USE_TZ=True)
    290292class DatabaseSessionWithTimeZoneTests(DatabaseSessionTests):
    291293    pass
    class CacheDBSessionTests(SessionTestsMixin, TestCase):  
    307309            self.assertEqual(self.session.load(), {})
    308310            self.assertEqual(len(w), 1)
    309311
    310 
     312@unittest.skipIf(not connection.features.supports_timezones,
     313    "Database backend does not support timezones")
    311314@override_settings(USE_TZ=True)
    312315class CacheDBSessionWithTimeZoneTests(CacheDBSessionTests):
    313316    pass
Back to Top