tests: change tests accordingly

This commit is contained in:
Karim shoair
2025-09-02 15:23:30 +03:00
parent af9a62a539
commit d49e047736
+13 -15
View File
@@ -178,23 +178,21 @@ class TestCustomShell:
def test_shell_initialization(self): def test_shell_initialization(self):
"""Test shell initialization""" """Test shell initialization"""
with patch('scrapling.core.shell.InteractiveShellEmbed'): shell = CustomShell(code="", log_level="debug")
shell = CustomShell(code="", log_level="debug")
assert shell.log_level == 10 # DEBUG level assert shell.log_level == 10 # DEBUG level
assert shell.page is None assert shell.page is None
assert len(shell.pages) == 0 assert len(shell.pages) == 0
def test_shell_namespace(self): def test_shell_namespace(self):
"""Test shell namespace creation""" """Test shell namespace creation"""
with patch('scrapling.core.shell.InteractiveShellEmbed'): shell = CustomShell(code="")
shell = CustomShell(code="") namespace = shell.get_namespace()
namespace = shell.get_namespace()
# Check all expected functions/classes are available # Check all expected functions/classes are available
assert 'get' in namespace assert 'get' in namespace
assert 'post' in namespace assert 'post' in namespace
assert 'Fetcher' in namespace assert 'Fetcher' in namespace
assert 'DynamicFetcher' in namespace assert 'DynamicFetcher' in namespace
assert 'view' in namespace assert 'view' in namespace
assert 'uncurl' in namespace assert 'uncurl' in namespace