Commit 342074f4 authored by Michael Manfre's avatar Michael Manfre Committed by Tim Graham
Browse files

[1.8.x] Fixed #25055 -- Made m2m long name testing friendlier for 3rd party databases.

Backport of f9c3587b from master
parent cb3e9bc0
Loading
Loading
Loading
Loading
+15 −11
Original line number Diff line number Diff line
@@ -328,6 +328,10 @@ class FieldNamesTests(IsolatedModelsTestCase):

        # First error because of M2M field set on the model with long name.
        m2m_long_name = "verylongmodelnamezzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz_id"
        if self.max_column_name_length > len(m2m_long_name):
            # Some databases support names longer than the test name.
            expected = []
        else:
            expected = [
                Error(
                    'Autogenerated column name too long for M2M field "%s". '