From 938af6fedebb3164291950c2e8d215a422ac37a8 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Wed, 9 Apr 2014 15:53:45 -0300 Subject: [PATCH] we receive the place back in the listing --- tests/group_tests.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/group_tests.py b/tests/group_tests.py index 48da38a..06219d5 100644 --- a/tests/group_tests.py +++ b/tests/group_tests.py @@ -485,5 +485,19 @@ class TestPlacesInGroup(LunchoTests): self.assertTrue('rejected' in json) self.assertTrue(place_id in json['rejected']) + def test_get_group_places(self): + """Try to get a list of places in the group.""" + group = self._group() + place = self._place() + group.places.append(place) + server.db.session.commit() + + rv = self.get('/group/{group_id}/places/'.format(group_id=group.id), + token=self.user.token) + self.assertJsonOk(rv) + json = loads(rv.data) + self.assertTrue('places' in json) + self.assertEquals(place.id, json['places'][0]['id']) + if __name__ == '__main__': unittest.main()