Skip to content

Commit 8a154d1

Browse files
author
Javier Palacios
committed
Globally fix output field on tests
1 parent 5304b33 commit 8a154d1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tests/testapp/test_aggregates.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ def setUp(self):
7474

7575
def test_basic_aggregate_ids(self):
7676
out = self.shakes.tutees.aggregate(tids=GroupConcat("id"))
77-
concatted_ids = ",".join(self.str_tutee_ids)
78-
assert out == {"tids": concatted_ids}
77+
assert out == {"tids": self.str_tutee_ids}
7978

8079
def test_basic_annotate_ids(self):
8180
concat = GroupConcat("tutees__id")
@@ -104,7 +103,7 @@ def test_separator_big(self):
104103
def test_expression(self):
105104
concat = GroupConcat(F("id") + 1)
106105
out = self.shakes.tutees.aggregate(tids=concat)
107-
concatted_ids = ",".join([str(self.jk.id + 1), str(self.grisham.id + 1)])
106+
concatted_ids = [str(self.jk.id + 1), str(self.grisham.id + 1)]
108107
assert out == {"tids": concatted_ids}
109108

110109
def test_application_order(self):
@@ -127,11 +126,11 @@ def test_ordering_invalid(self):
127126

128127
def test_ordering_asc(self):
129128
out = self.shakes.tutees.aggregate(tids=GroupConcat("id", ordering="asc"))
130-
assert out == {"tids": ",".join(self.str_tutee_ids)}
129+
assert out == {"tids": self.str_tutee_ids}
131130

132131
def test_ordering_desc(self):
133132
out = self.shakes.tutees.aggregate(tids=GroupConcat("id", ordering="desc"))
134-
assert out == {"tids": ",".join(reversed(self.str_tutee_ids))}
133+
assert out == {"tids": reversed(self.str_tutee_ids)}
135134

136135
def test_separator_ordering(self):
137136
concat = GroupConcat("id", separator=":", ordering="asc")

0 commit comments

Comments
 (0)