Explorar o código

Removed hardcoded pks in TestQuerying.test_group_by_order_by_aliases test.

Mariusz Felisiak %!s(int64=2) %!d(string=hai) anos
pai
achega
749cd83e13
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      tests/postgres_tests/test_array.py

+ 3 - 3
tests/postgres_tests/test_array.py

@@ -421,9 +421,9 @@ class TestQuerying(PostgreSQLTestCase):
                 .annotate(arrayagg=ArrayAgg("id"))
                 .order_by("field__0"),
                 [
-                    {"field__0": 1, "arrayagg": [1]},
-                    {"field__0": 2, "arrayagg": [2, 3]},
-                    {"field__0": 20, "arrayagg": [4]},
+                    {"field__0": 1, "arrayagg": [self.objs[0].pk]},
+                    {"field__0": 2, "arrayagg": [self.objs[1].pk, self.objs[2].pk]},
+                    {"field__0": 20, "arrayagg": [self.objs[3].pk]},
                 ],
             )
         alias = connection.ops.quote_name("field__0")