Skip to content

Commit 55d1251

Browse files
committed
try fix postgres choices test
1 parent a008c2f commit 55d1251

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test_parser_completers.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2517,6 +2517,14 @@ def test_choices_completer(self):
25172517
f"choices --{field.replace('_', '-')}s {test_str}"
25182518
)
25192519
)
2520+
# postgres normalizes the IPs - revert that
2521+
if field == "ip_choice":
2522+
for idx in range(0, len(completions)):
2523+
completions[idx] = (
2524+
completions[idx][0].split("/")[0],
2525+
completions[idx][1],
2526+
)
2527+
25202528
str_qry = self.MODEL_CLASS.objects.annotate(
25212529
field_as_str=Cast(field, output_field=CharField())
25222530
)

0 commit comments

Comments
 (0)