Commit Graph

50 Commits

Author SHA1 Message Date
Tim Graham a862af3839
Fixed #28893 -- Removed unnecessary dict.items() calls. 2017-12-06 17:17:59 -05:00
Tim Graham c7e9e22695 Added cleanup for an introspection test. 2017-09-27 09:51:49 -04:00
Tim Graham 578711c310 Refs #27098 -- Removed DatabaseIntrospection.get_indexes() per deprecation timeline. 2017-09-22 12:51:18 -04:00
Mariusz Felisiak c6a1faecc3 Refs #27090 -- Added real database sequence introspection.
Thanks Mariusz Felisiak for the Oracle part and Tim Graham for the
review.
2017-09-13 20:12:32 +02:00
Tim Schneider 3a5299c19c Fixed #28197 -- Fixed introspection of index field ordering on PostgreSQL. 2017-05-15 08:33:31 -04:00
Tim Graham b008f7cc56 Fixed #27135 -- Made index introspection return Index.suffix. 2017-02-15 20:15:02 -05:00
Tim Graham 7aba69145d Refs #23919 -- Removed django.test.mock Python 2 compatibility shim. 2017-01-20 08:17:20 -05:00
Claude Paroz f3c43ad1fd Refs #23919 -- Removed python_2_unicode_compatible decorator usage 2017-01-18 13:44:34 +01:00
Claude Paroz d7b9aaa366 Refs #23919 -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00
Mariusz Felisiak cc0bb07013 Refs #19884 -- Removed DatabaseFeatures.can_introspect_max_length.
Unused (always True) after 3e43d24ad3.
2016-12-19 16:16:11 -05:00
Mariusz Felisiak 3e43d24ad3 Refs #19884 -- Added CharField max_length introspection on Oracle. 2016-12-19 08:29:42 -05:00
za 321e94fa41 Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
Saulius Žemaitaitis f28d29e8b7 Fixed #27372 -- Fixed introspection of SQLite foreign keys with spaces in DDL.
Thanks samuller for the report and initial patch.
2016-11-06 10:13:32 +01:00
Claude Paroz d389125606 Fixed #27098 -- Deprecated DatabaseIntrospection.get_indexes
Thanks Akshesh <aksheshdoshi@gmail.com> for help with the PostgreSQL query.
Thanks Tim Graham for the review.
2016-09-12 09:26:33 +02:00
Adam Chainz 652bcc6f5f Refs #25415 -- Fixed invalid models in the test suite. 2016-09-09 17:16:42 -04:00
Akshesh dbccf163b6 Fixed #27097 -- Added index type introspection to built-in db backends. 2016-09-02 21:14:12 -04:00
Akshesh 4c7bf83cde Refs #27097, #27098 -- Moved PostgreSQL index type introspection to get_constraints(). 2016-08-30 08:48:55 -04:00
Claude Paroz 00bb47b58f Fixed #27096 -- Fixed primary key introspection for sqlite3 backend 2016-08-20 15:57:17 +02:00
Akshesh 2f19306a12 Refs #27030 -- Added index type introspection on PostgreSQL. 2016-08-12 16:58:40 -04:00
Akshesh f842d1011c Refs #20888 -- Added index order introspection. 2016-08-12 11:51:09 -04:00
Tim Graham 92053acbb9 Fixed E128 flake8 warnings in tests/. 2016-04-08 10:12:33 -04:00
Matthew Schinckel 60633ef3de Fixed #26304 -- Ignored unmanaged through model in table introspection. 2016-03-02 13:54:27 -05:00
Alexander Sosnovskiy 2a7ce34600 Fixed #14286 -- Added models.BigAutoField. 2015-12-25 20:01:31 -05:00
Dražen Odobašić b1e33ceced Fixed #23395 -- Limited line lengths to 119 characters. 2015-09-12 11:40:50 -04:00
Flavio Curella c2e70f0265 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 2015-07-27 18:28:13 -04:00
Collin Anderson db77915c9f Fixed E265 comment style 2015-02-06 09:30:35 -05:00
Tim Graham 0ed7d15563 Sorted imports with isort; refs #23860. 2015-02-06 08:16:28 -05:00
Claude Paroz 4c413e231c Fixed #17785 -- Preferred column names in get_relations introspection
Thanks Thomas Güttler for the report and the initial patch, and
Tim Graham for the review.
2015-01-12 19:58:47 +01:00
Claude Paroz 7289d01973 Introspected alternate SQLite FK definitions 2015-01-10 16:51:14 +01:00
Claude Paroz ffca9b49d4 Updated introspection test to use skipUnlessDBFeature 2015-01-10 15:42:31 +01:00
Diego Guimarães 106dde91e4 Refs #23947 -- Fixed introspection test that had a side effect. 2014-12-06 13:00:25 -05:00
Thomas Chaumeny da9fe5c717 Fixed #20392 -- Added TestCase.setUpTestData()
Each TestCase is also now wrapped in a class-wide transaction.
2014-12-03 10:37:04 -05:00
Berker Peksag f7969b0920 Fixed #23620 -- Used more specific assertions in the Django test suite. 2014-11-03 11:56:37 -05:00
Tim Graham 4b257cf261 Fixed flake8 warnings. 2014-09-29 08:13:40 -04:00
Thomas Chaumeny b2aad7b836 Replaced set([foo, ...]) by {foo, ...} literals. Refs PR 3282.
Thanks Collin Anderson for the review.
2014-09-29 00:01:38 +07:00
Shai Berger d128eac316 Changed Oracle test-user creation to grant privileges instead of roles
because the roles (specifically RESOURCE) are deprecated.
Also added optional support for creating views in tests, and made an
introspection test fail (rather than skip)  if a view cannot be created
due to lacking privileges.

Refs #18782

Thanks Tim Graham for review, and Josh Smeaton
2014-09-24 04:58:33 +03:00
Claude Paroz ed297061a6 Fixed #18782 -- Prevented sql_flush to flush views
Thanks rodolfo_3 for the report and the initial patch, and
Josh Smeaton, Shai Berger and Tim Graham for the reviews.
2014-09-23 20:13:31 +02:00
Jon Dufresne f0d3dd4f04 Fixed #23357 -- Added small int introspection support to MySQL backend.
In the MySQL backend, updated the can_introspect_small_integer feature
flag to True. In data_types_reverse, map FIELD_TYPE.SHORT to a
SmallIntegerField. Added test to verify introspecting SmallIntegerFields
and fixed existing tests influenced by this change.
2014-08-27 10:58:44 -04:00
Josh Smeaton b7455b52a0 Fixed #22988 -- Adjusted an introspection test assertion.
Also changed test to use assertNotIn.
2014-07-10 00:47:57 -04:00
Tim Graham 7fd55c3481 Fixed #20631 -- Increased the default EmailField max_length to 254.
Thanks pmartin for the report.
2014-07-04 14:15:00 -04:00
Shai Berger 612290400f Fixed #22816 -- Corrected Oracle feature flag and fixed introspection test 2014-06-14 00:43:49 +03:00
Aymeric Augustin a03d38ddd4 Added a flag for the ability to introspect nullable fields.
Previously this was conflated with another Oracle-specific behavior.
2014-06-05 17:56:56 +02:00
Aymeric Augustin fb90b7cda2 Adjusted refactoring of vendor checks.
Thanks Shai for the thorough review.
2014-05-10 14:40:42 +02:00
Aymeric Augustin 99d9fa329a Added feature flags for introspection capabilities. 2014-05-08 22:11:20 +02:00
Michael Manfre 3ffeb93186 Ensure cursors are closed when no longer needed.
This commit touchs various parts of the code base and test framework. Any
found usage of opening a cursor for the sake of initializing a connection
has been replaced with 'ensure_connection()'.
2014-02-02 12:47:21 -05:00
Michael Manfre c89d80e2cc Fixed #21097 - Added DatabaseFeature.can_introspect_autofield 2013-09-14 09:48:59 +03:00
Claude Paroz 5c1143910e Removed most of absolute_import imports
Should be unneeded with Python 2.7 and up.
Added some unicode_literals along the way.
2013-07-29 20:28:13 +02:00
Aymeric Augustin cfcf4b3605 Stopped using django.utils.unittest in the test suite.
Refs #20680.
2013-07-01 14:29:33 +02:00
Claude Paroz c5a25c2771 Add introspection support for BinaryField 2013-03-02 10:29:03 +01:00
Florian Apolloner 89f40e3624 Merged regressiontests and modeltests into the test root. 2013-02-26 14:36:57 +01:00