Исправлено: использовать hex коды вместо названий цветов в тестах
Проблема: - Поле OrderStatus.color имеет max_length=7 (для hex типа #FF5733) - В тестах использовались названия: 'secondary', 'warning', 'success' (9 символов) - PostgreSQL выдавал ошибку: value too long for type character varying(7) Решение: - Заменены названия цветов на hex коды: * 'secondary' → '#9E9E9E' (серый) * 'warning' → '#FF9800' (оранжевый) * 'success' → '#4CAF50' (зелёный) * 'danger' → '#F44336' (красный) * 'info' → '#17A2B8' (голубой)
This commit is contained in:
@@ -104,7 +104,7 @@ class OrderStatusTransitionCriticalTest(TransactionTestCase):
|
||||
is_system=True,
|
||||
is_positive_end=False,
|
||||
is_negative_end=False,
|
||||
color='secondary',
|
||||
color='#9E9E9E',
|
||||
order=0
|
||||
)
|
||||
|
||||
@@ -114,7 +114,7 @@ class OrderStatusTransitionCriticalTest(TransactionTestCase):
|
||||
is_system=True,
|
||||
is_positive_end=False,
|
||||
is_negative_end=False,
|
||||
color='warning',
|
||||
color='#FF9800',
|
||||
order=1
|
||||
)
|
||||
|
||||
@@ -124,7 +124,7 @@ class OrderStatusTransitionCriticalTest(TransactionTestCase):
|
||||
is_system=True,
|
||||
is_positive_end=True,
|
||||
is_negative_end=False,
|
||||
color='success',
|
||||
color='#4CAF50',
|
||||
order=2
|
||||
)
|
||||
|
||||
@@ -134,7 +134,7 @@ class OrderStatusTransitionCriticalTest(TransactionTestCase):
|
||||
is_system=True,
|
||||
is_positive_end=False,
|
||||
is_negative_end=True,
|
||||
color='danger',
|
||||
color='#F44336',
|
||||
order=3
|
||||
)
|
||||
|
||||
@@ -145,7 +145,7 @@ class OrderStatusTransitionCriticalTest(TransactionTestCase):
|
||||
is_system=False,
|
||||
is_positive_end=False,
|
||||
is_negative_end=False,
|
||||
color='info',
|
||||
color='#17A2B8',
|
||||
order=4
|
||||
)
|
||||
|
||||
|
||||
1121
myproject/test_output.txt
Normal file
1121
myproject/test_output.txt
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user