Skip to content

Conversation

cawmichael
Copy link
Contributor

No description provided.

@ottonomy
Copy link
Collaborator

Would love to see a test added to cover this task. I can do it if you don't have time.

You could use this test from test_graph.py as a base.

class HttpFetchingTests(unittest.TestCase):

    @responses.activate
    def test_basic_http_fetch_task(self):
        url = 'http://example.com/assertionmaybe'
        responses.add(
            responses.GET, url,
            body=test_components['2_0_basic_assertion'],
            status=200, content_type='application/ld+json'
        )
        task = add_task(FETCH_HTTP_NODE, url=url)

        success, message, actions = fetch_http_node({}, task)

        self.assertTrue(success)
        self.assertEqual(len(actions), 2)
        self.assertEqual(actions[0]['type'], STORE_ORIGINAL_RESOURCE)
        self.assertEqual(actions[1]['name'], INTAKE_JSON)

@ottonomy
Copy link
Collaborator

ottonomy commented Sep 27, 2017

@cawmichael @mgylling ugh, A bit stuck. Pushed what I had with a couple changes to the test to a local branch here in this repo: cawmichael-feature/utf8-support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants