# Path: nuka/tasks/http.py
# class fetch(Task):
#     def __init__(self, src=None, dst=None, **kwargs):
#     def fetch(self, dst, src):
#     def do(self):


import os
import pytest
import nuka
from nuka.tasks import http
# -*- coding: utf-8 -*-


@pytest.mark.asyncio
async def test_fetch(host):
    res = await http.fetch('http://bearstech.com')
    assert res.dst == os.path.join(nuka.config['remote_tmp'], 'bearstech.com')

# Path: nuka/tasks/http.py
# class fetch(Task):
#     def __init__(self, src=None, dst=None, **kwargs):
#     def fetch(self, dst, src):
#     def do(self):


# Path: tests/tasks/test_http.py
import os
import pytest
import nuka
from nuka.tasks import http

# -*- coding: utf-8 -*-


@pytest.mark.asyncio
async def test_fetch(host):
    res = await http.fetch('http://bearstech.com')
    assert res.dst == os.path.join(nuka.config['remote_tmp'], 'bearstech.com')

    res = await http.fetch('http://bearstech.com', dst='/tmp/bt.com')