summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2015-05-02 22:26:27 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2015-05-17 10:23:13 +0200
commitda2c6959c8da20ff9e4ebc5e68e2be44930116cd (patch)
tree100a18ef9d1b664a78c8fa1466b0131be1bba6f7 /tests
parente2a652fac1ce9af51e2dfdfb4e26a1c94cf3189c (diff)
Dropped the needs_datetime_string_cast feature.
It has been superseded by the converter infrastructure.
Diffstat (limited to 'tests')
-rw-r--r--tests/timezones/tests.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/tests/timezones/tests.py b/tests/timezones/tests.py
index 825663436c..3983ec9fa8 100644
--- a/tests/timezones/tests.py
+++ b/tests/timezones/tests.py
@@ -106,7 +106,6 @@ class LegacyDatabaseTests(TestCase):
self.assertEqual(event.dt.replace(tzinfo=EAT), dt.replace(microsecond=0))
@skipUnlessDBFeature('supports_timezones')
- @skipIfDBFeature('needs_datetime_string_cast')
def test_aware_datetime_in_utc(self):
dt = datetime.datetime(2011, 9, 1, 10, 20, 30, tzinfo=UTC)
Event.objects.create(dt=dt)
@@ -115,24 +114,7 @@ class LegacyDatabaseTests(TestCase):
# interpret the naive datetime in local time to get the correct value
self.assertEqual(event.dt.replace(tzinfo=EAT), dt)
- # This combination is no longer possible since timezone support
- # was removed from the SQLite backend -- it didn't work.
@skipUnlessDBFeature('supports_timezones')
- @skipUnlessDBFeature('needs_datetime_string_cast')
- def test_aware_datetime_in_utc_unsupported(self):
- dt = datetime.datetime(2011, 9, 1, 10, 20, 30, tzinfo=UTC)
- Event.objects.create(dt=dt)
- event = Event.objects.get()
- self.assertIsNone(event.dt.tzinfo)
- # django.db.backends.utils.typecast_dt will just drop the
- # timezone, so a round-trip in the database alters the data (!)
- # interpret the naive datetime in local time and you get a wrong value
- self.assertNotEqual(event.dt.replace(tzinfo=EAT), dt)
- # interpret the naive datetime in original time to get the correct value
- self.assertEqual(event.dt.replace(tzinfo=UTC), dt)
-
- @skipUnlessDBFeature('supports_timezones')
- @skipIfDBFeature('needs_datetime_string_cast')
def test_aware_datetime_in_other_timezone(self):
dt = datetime.datetime(2011, 9, 1, 17, 20, 30, tzinfo=ICT)
Event.objects.create(dt=dt)
@@ -141,22 +123,6 @@ class LegacyDatabaseTests(TestCase):
# interpret the naive datetime in local time to get the correct value
self.assertEqual(event.dt.replace(tzinfo=EAT), dt)
- # This combination is no longer possible since timezone support
- # was removed from the SQLite backend -- it didn't work.
- @skipUnlessDBFeature('supports_timezones')
- @skipUnlessDBFeature('needs_datetime_string_cast')
- def test_aware_datetime_in_other_timezone_unsupported(self):
- dt = datetime.datetime(2011, 9, 1, 17, 20, 30, tzinfo=ICT)
- Event.objects.create(dt=dt)
- event = Event.objects.get()
- self.assertIsNone(event.dt.tzinfo)
- # django.db.backends.utils.typecast_dt will just drop the
- # timezone, so a round-trip in the database alters the data (!)
- # interpret the naive datetime in local time and you get a wrong value
- self.assertNotEqual(event.dt.replace(tzinfo=EAT), dt)
- # interpret the naive datetime in original time to get the correct value
- self.assertEqual(event.dt.replace(tzinfo=ICT), dt)
-
@skipIfDBFeature('supports_timezones')
def test_aware_datetime_unspported(self):
dt = datetime.datetime(2011, 9, 1, 13, 20, 30, tzinfo=EAT)