def test_returns_json_of_near_by(self, m): c = Checkin(point=KRK_LUBICZ, text="Lala") m.return_value = [c] resp = self.get_valid() resp_data = json.loads(resp.content) self.assertEqual([c.as_dict()], resp_data)