summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2017-12-20 17:05:27 +0100
committerTim Graham <timograham@gmail.com>2017-12-20 11:05:27 -0500
commitfc9eec7bb7d5e3e6426bb612277bfcecb943e8ac (patch)
tree3d0efaff4edba61d2541f43dd4a8a0f723ba3814 /tests
parenta7a36bb4d8ef7f03c2df9e3279c8f488ab3641d1 (diff)
Fixed #28934 -- Prevented Cast from truncating microseconds on Oracle.
Diffstat (limited to 'tests')
-rw-r--r--tests/db_functions/test_cast.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/db_functions/test_cast.py b/tests/db_functions/test_cast.py
index 6a6db9016d..42bbce118e 100644
--- a/tests/db_functions/test_cast.py
+++ b/tests/db_functions/test_cast.py
@@ -1,6 +1,6 @@
import datetime
-from django.db import connection, models
+from django.db import models
from django.db.models.expressions import Value
from django.db.models.functions import Cast
from django.test import TestCase, ignore_warnings, skipUnlessDBFeature
@@ -51,9 +51,6 @@ class CastTests(TestCase):
def test_cast_from_python_to_datetime(self):
now = datetime.datetime.now()
- if connection.vendor == 'oracle':
- # Workaround until #28934 is fixed.
- now = now.replace(microsecond=0)
dates = Author.objects.annotate(cast_datetime=Cast(now, models.DateTimeField()))
self.assertEqual(dates.get().cast_datetime, now)