mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-26 11:49:36 +00:00
40 lines
873 B
Python
40 lines
873 B
Python
"""Tests for hanzo-tools-browser."""
|
|
|
|
import pytest
|
|
|
|
|
|
class TestImports:
|
|
"""Test that all modules can be imported."""
|
|
|
|
def test_import_package(self):
|
|
from hanzo_tools import browser
|
|
|
|
assert browser is not None
|
|
|
|
def test_import_tools(self):
|
|
from hanzo_tools.browser import TOOLS
|
|
|
|
assert len(TOOLS) > 0
|
|
|
|
def test_import_browser_tool(self):
|
|
from hanzo_tools.browser import BrowserTool
|
|
|
|
assert BrowserTool.name == "browser"
|
|
|
|
|
|
class TestBrowserTool:
|
|
"""Tests for BrowserTool."""
|
|
|
|
@pytest.fixture
|
|
def tool(self):
|
|
from hanzo_tools.browser import BrowserTool
|
|
|
|
return BrowserTool()
|
|
|
|
def test_has_description(self, tool):
|
|
assert tool.description
|
|
assert (
|
|
"browser" in tool.description.lower()
|
|
or "playwright" in tool.description.lower()
|
|
)
|