diff options
Diffstat (limited to 'crocoite/test_browser.py')
-rw-r--r-- | crocoite/test_browser.py | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/crocoite/test_browser.py b/crocoite/test_browser.py index 030ffb1..331fa49 100644 --- a/crocoite/test_browser.py +++ b/crocoite/test_browser.py @@ -25,9 +25,9 @@ from operator import itemgetter from aiohttp import web from http.server import BaseHTTPRequestHandler -from .browser import Item, SiteLoader, ChromeService, NullService +from .browser import Item, SiteLoader from .logger import Logger, Consumer, JsonPrintConsumer -from .devtools import Crashed +from .devtools import Crashed, Process # if you want to know what’s going on: #logging.basicConfig(level=logging.DEBUG) @@ -122,12 +122,12 @@ def logger (): return Logger (consumer=[AssertConsumer ()]) @pytest.fixture -def loader (server, logger): +async def loader (server, logger): def f (path): if path.startswith ('/'): path = 'http://localhost:8080{}'.format (path) return SiteLoader (browser, path, logger) - with ChromeService () as browser: + async with Process () as browser: yield f async def itemsLoaded (l, items): @@ -228,10 +228,3 @@ async def test_invalidurl (loader): assert it.failed break -def test_nullservice (): - """ Null service returns the url as is """ - - url = 'http://localhost:12345' - with NullService (url) as u: - assert u == url - |