mirror of
https://github.com/django/django.git
synced 2025-02-10 01:16:53 +00:00
Fixed #25055 -- Made m2m long name testing friendlier for 3rd party databases.
This commit is contained in:
parent
3353684102
commit
f9c3587b51
@ -328,6 +328,10 @@ class FieldNamesTests(IsolatedModelsTestCase):
|
|||||||
|
|
||||||
# First error because of M2M field set on the model with long name.
|
# First error because of M2M field set on the model with long name.
|
||||||
m2m_long_name = "verylongmodelnamezzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz_id"
|
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 = [
|
expected = [
|
||||||
Error(
|
Error(
|
||||||
'Autogenerated column name too long for M2M field "%s". '
|
'Autogenerated column name too long for M2M field "%s". '
|
||||||
|
Loading…
x
Reference in New Issue
Block a user