Skip to content

Commit 523549e

Browse files
committed
fix admin form tests on oracle
1 parent ff0108c commit 523549e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/test_admin.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ def verify_changes(self, obj: Model, expected: t.Dict[str, t.Any]):
193193
if not field.coerce:
194194
exp = getattr(exp, "value", exp)
195195
if exp is None or (isinstance(exp, str) and not exp):
196-
if isinstance(obj_val, Enum):
196+
if isinstance(obj_val, Flag) and connection.vendor == "oracle":
197+
self.assertEqual(obj_val, self.enum(field.name)(0))
198+
elif isinstance(obj_val, Enum):
197199
self.assertIsNone(
198200
obj_val.value, f"{obj._meta.model_name}.{field.name}"
199201
)

0 commit comments

Comments
 (0)