|
|
@ -426,7 +426,7 @@ class TestPlacesInGroup(LunchoTests): |
|
|
|
user = self.user |
|
|
|
user = self.user |
|
|
|
|
|
|
|
|
|
|
|
place = Place(name='Place', |
|
|
|
place = Place(name='Place', |
|
|
|
owner=self.user) |
|
|
|
owner=user) |
|
|
|
server.db.session.add(place) |
|
|
|
server.db.session.add(place) |
|
|
|
server.db.session.commit() |
|
|
|
server.db.session.commit() |
|
|
|
return place |
|
|
|
return place |
|
|
@ -470,6 +470,7 @@ class TestPlacesInGroup(LunchoTests): |
|
|
|
verified=True) |
|
|
|
verified=True) |
|
|
|
group = self._group() # group belongs to self.user |
|
|
|
group = self._group() # group belongs to self.user |
|
|
|
place = self._place(new_user) # place belongs to new_user |
|
|
|
place = self._place(new_user) # place belongs to new_user |
|
|
|
|
|
|
|
place_id = place.id |
|
|
|
|
|
|
|
|
|
|
|
request = {'places': [place.id]} |
|
|
|
request = {'places': [place.id]} |
|
|
|
group_id = group.id |
|
|
|
group_id = group.id |
|
|
@ -477,6 +478,9 @@ class TestPlacesInGroup(LunchoTests): |
|
|
|
request, |
|
|
|
request, |
|
|
|
token=self.user.token) |
|
|
|
token=self.user.token) |
|
|
|
self.assertJsonOk(rv) |
|
|
|
self.assertJsonOk(rv) |
|
|
|
|
|
|
|
json = loads(rv.data) |
|
|
|
|
|
|
|
self.assertTrue('rejected' in json) |
|
|
|
|
|
|
|
self.assertTrue(place_id in json['rejected']) |
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
|
if __name__ == '__main__': |
|
|
|
unittest.main() |
|
|
|
unittest.main() |
|
|
|