#31801: Oracle schema tests error out on Windows
-------------------------------------+-------------------------------------
Reporter: Ahmad A. | Owner: nobody
Hussein |
Type: Bug | Status: new
Component: Database | Version: master
layer (models, ORM) | Keywords: oracle, windows,
Severity: Normal | schema
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Running the Django test suite on Windows with python3.8 gives the
following errors in schema tests
{{{
ERROR: test_add_datefield_and_datetimefield_use_effective_default
(schema.tests.SchemaTests)
effective_default() should be used for DateField, DateTimeField, and
----------------------------------------------------------------------
Traceback (most recent call last):
File
"c:\users\ahmad\appdata\local\programs\python\python38\lib\unittest\mock.py",
line 1325, in patched
return func(*newargs, **newkeywargs)
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 2972, in test_add_datefield_and_datetimefield_use_effective_default
columns = self.column_classes(Author)
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 100, in column_classes
columns = {
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 101, in <dictcomp>
d[0]: (connection.introspection.get_field_type(d[1], d), d)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\oracle\introspection.py",
line 51, in get_field_type
return super().get_field_type(data_type, description)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\base\introspection.py",
line 25, in get_field_type
return self.data_types_reverse[data_type]
KeyError: <cx_Oracle.DbType DB_TYPE_VARCHAR>
======================================================================
ERROR: test_add_field (schema.tests.SchemaTests)
Tests adding fields to models
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 488, in test_add_field
columns = self.column_classes(Author)
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 100, in column_classes
columns = {
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 101, in <dictcomp>
d[0]: (connection.introspection.get_field_type(d[1], d), d)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\oracle\introspection.py",
line 51, in get_field_type
return super().get_field_type(data_type, description)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\base\introspection.py",
line 25, in get_field_type
return self.data_types_reverse[data_type]
KeyError: <cx_Oracle.DbType DB_TYPE_VARCHAR>
======================================================================
ERROR: test_add_field_binary (schema.tests.SchemaTests)
Tests binary fields get a sane default (#22851)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 612, in test_add_field_binary
columns = self.column_classes(Author)
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 100, in column_classes
columns = {
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 101, in <dictcomp>
d[0]: (connection.introspection.get_field_type(d[1], d), d)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\oracle\introspection.py",
line 51, in get_field_type
return super().get_field_type(data_type, description)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\base\introspection.py",
line 25, in get_field_type
return self.data_types_reverse[data_type]
KeyError: <cx_Oracle.DbType DB_TYPE_VARCHAR>
======================================================================
ERROR: test_add_field_default_dropped (schema.tests.SchemaTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 2650, in test_add_field_default_dropped
columns = self.column_classes(Author)
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 100, in column_classes
columns = {
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 101, in <dictcomp>
d[0]: (connection.introspection.get_field_type(d[1], d), d)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\oracle\introspection.py",
line 51, in get_field_type
return super().get_field_type(data_type, description)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\base\introspection.py",
line 25, in get_field_type
return self.data_types_reverse[data_type]
KeyError: <cx_Oracle.DbType DB_TYPE_VARCHAR>
======================================================================
ERROR: test_add_field_default_transform (schema.tests.SchemaTests)
Tests adding fields to models with a default that is not directly
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 593, in test_add_field_default_transform
columns = self.column_classes(Author)
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 100, in column_classes
columns = {
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 101, in <dictcomp>
d[0]: (connection.introspection.get_field_type(d[1], d), d)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\oracle\introspection.py",
line 51, in get_field_type
return super().get_field_type(data_type, description)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\base\introspection.py",
line 25, in get_field_type
return self.data_types_reverse[data_type]
KeyError: <cx_Oracle.DbType DB_TYPE_VARCHAR>
======================================================================
ERROR: test_add_field_temp_default (schema.tests.SchemaTests)
Tests adding fields to models with a temporary default
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 523, in test_add_field_temp_default
columns = self.column_classes(Author)
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 100, in column_classes
columns = {
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 101, in <dictcomp>
d[0]: (connection.introspection.get_field_type(d[1], d), d)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\oracle\introspection.py",
line 51, in get_field_type
return super().get_field_type(data_type, description)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\base\introspection.py",
line 25, in get_field_type
return self.data_types_reverse[data_type]
KeyError: <cx_Oracle.DbType DB_TYPE_VARCHAR>
======================================================================
ERROR: test_add_field_temp_default_boolean (schema.tests.SchemaTests)
Tests adding fields to models with a temporary default where
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 548, in test_add_field_temp_default_boolean
columns = self.column_classes(Author)
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 100, in column_classes
columns = {
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 101, in <dictcomp>
d[0]: (connection.introspection.get_field_type(d[1], d), d)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\oracle\introspection.py",
line 51, in get_field_type
return super().get_field_type(data_type, description)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\base\introspection.py",
line 25, in get_field_type
return self.data_types_reverse[data_type]
KeyError: <cx_Oracle.DbType DB_TYPE_VARCHAR>
======================================================================
ERROR: test_add_field_use_effective_default (schema.tests.SchemaTests)
#23987 - effective_default() should be used as the field default when
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 2630, in test_add_field_use_effective_default
columns = self.column_classes(Author)
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 100, in column_classes
columns = {
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 101, in <dictcomp>
d[0]: (connection.introspection.get_field_type(d[1], d), d)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\oracle\introspection.py",
line 51, in get_field_type
return super().get_field_type(data_type, description)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\base\introspection.py",
line 25, in get_field_type
return self.data_types_reverse[data_type]
KeyError: <cx_Oracle.DbType DB_TYPE_VARCHAR>
======================================================================
ERROR: test_alter (schema.tests.SchemaTests)
Tests simple altering of fields
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 642, in test_alter
columns = self.column_classes(Author)
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 100, in column_classes
columns = {
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 101, in <dictcomp>
d[0]: (connection.introspection.get_field_type(d[1], d), d)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\oracle\introspection.py",
line 51, in get_field_type
return super().get_field_type(data_type, description)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\base\introspection.py",
line 25, in get_field_type
return self.data_types_reverse[data_type]
KeyError: <cx_Oracle.DbType DB_TYPE_VARCHAR>
======================================================================
ERROR: test_alter_null_to_not_null (schema.tests.SchemaTests)
#23609 - Tests handling of default values when altering from NULL to NOT
NULL.
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 858, in test_alter_null_to_not_null
columns = self.column_classes(Author)
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 100, in column_classes
columns = {
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 101, in <dictcomp>
d[0]: (connection.introspection.get_field_type(d[1], d), d)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\oracle\introspection.py",
line 51, in get_field_type
return super().get_field_type(data_type, description)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\base\introspection.py",
line 25, in get_field_type
return self.data_types_reverse[data_type]
KeyError: <cx_Oracle.DbType DB_TYPE_VARCHAR>
======================================================================
ERROR: test_alter_text_field_to_date_field (schema.tests.SchemaTests)
#25002 - Test conversion of text field to date field.
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 782, in test_alter_text_field_to_date_field
columns = self.column_classes(Note)
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 100, in column_classes
columns = {
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 101, in <dictcomp>
d[0]: (connection.introspection.get_field_type(d[1], d), d)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\oracle\introspection.py",
line 51, in get_field_type
return super().get_field_type(data_type, description)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\base\introspection.py",
line 25, in get_field_type
return self.data_types_reverse[data_type]
KeyError: <cx_Oracle.DbType DB_TYPE_DATE>
======================================================================
ERROR: test_rename (schema.tests.SchemaTests)
Tests simple altering of fields
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 1440, in test_rename
columns = self.column_classes(Author)
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 100, in column_classes
columns = {
File "C:\Users\ahmad\Desktop\Projects\DjangoGSOC\tests\schema\tests.py",
line 101, in <dictcomp>
d[0]: (connection.introspection.get_field_type(d[1], d), d)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\oracle\introspection.py",
line 51, in get_field_type
return super().get_field_type(data_type, description)
File
"c:\users\ahmad\desktop\projects\djangogsoc\django\db\backends\base\introspection.py",
line 25, in get_field_type
return self.data_types_reverse[data_type]
KeyError: <cx_Oracle.DbType DB_TYPE_VARCHAR>}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31801>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.6d071444bb44974a7e94d2cba78e88ed%40djangoproject.com.