def create_test_user(self):
        result = post(self._test_users_url('installed=true'))
        if result.status_code != requests.codes.ok:
            raise UserCreationError(result.text)

        user_json = result.json()
        return TestUser.from_json(user_json)
 def make_friend_request(self, other_user):
     result = post('/%s/friends/%s?&access_token=%s' % (self.id, other_user.id, self.token))
     if result.status_code != requests.codes.ok:
         raise FriendshipError(result.text)