From 2c53573b7e081c57d4b92da7a1a786bd41621bbe Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sun, 17 Jun 2018 20:58:50 +0200 Subject: [PATCH] Fix the tests --- tests/federation_test.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/federation_test.py b/tests/federation_test.py index 1bdda92..8f6ccac 100644 --- a/tests/federation_test.py +++ b/tests/federation_test.py @@ -6,7 +6,7 @@ from typing import Tuple import requests from html2text import html2text -from utils import activitypub_utils +from little_boxes.collection import parse_collection def resp2plaintext(resp): @@ -33,14 +33,14 @@ class Instance(object): def _do_req(self, url, headers): """Used to parse collection.""" url = url.replace(self.docker_url, self.host_url) - resp = requests.get(url, headers=headers) + resp = requests.get(url, headers={'Accept': 'application/actiivty+json'}) resp.raise_for_status() return resp.json() def _parse_collection(self, payload=None, url=None): """Parses a collection (go through all the pages).""" - return activitypub_utils.parse_collection( - url=url, payload=payload, do_req=self._do_req + return parse_collection( + url=url, payload=payload, fetcher=self._do_req, ) def ping(self):