22
33from idom .__main__ import main
44from idom import client
5+ from idom .client .manage import delete_web_modules , installed
56
67from tests .general_utils import assert_same_items
78
89
910@pytest .mark .slow
1011def test_simple_install (capsys ):
11- client . delete_web_modules ("jquery" , skip_missing = True )
12+ delete_web_modules ("jquery" , skip_missing = True )
1213
1314 main ("install" , "jquery" )
14- assert client .web_module_exists ("jquery" )
15+ assert client .current . web_module_exists ("jquery" )
1516 main ("installed" )
1617 captured = capsys .readouterr ()
1718 assert "- jquery" in captured .out
1819
1920 main ("uninstall" , "jquery" )
20- assert not client .web_module_exists ("jquery" )
21+ assert not client .current . web_module_exists ("jquery" )
2122
2223
2324@pytest .mark .slow
2425def test_install_with_exports (capsys ):
25- client . delete_web_modules (["preact" , "preact/hooks" ], skip_missing = True )
26+ delete_web_modules (["preact" , "preact/hooks" ], skip_missing = True )
2627
2728 main ("install" , "preact" , "--exports" , "preact/hooks" )
28- assert client .web_module_exists ("preact/hooks" )
29+ assert client .current . web_module_exists ("preact/hooks" )
2930 main ("installed" )
3031 captured = capsys .readouterr ()
3132 assert "- preact" in captured .out
3233 assert "- preact/hooks" in captured .out
3334
3435 main ("uninstall" , "preact" )
35- assert not client .web_module_exists ("preact/hooks" )
36+ assert not client .current . web_module_exists ("preact/hooks" )
3637 main ("installed" )
3738 captured = capsys .readouterr ()
3839 assert "- preact" not in captured .out
@@ -42,9 +43,7 @@ def test_install_with_exports(capsys):
4243@pytest .mark .slow
4344def test_restore (capsys ):
4445 main ("restore" )
45- assert_same_items (
46- client .installed (), ["fast-json-patch" , "htm" , "react" , "react-dom" ]
47- )
46+ assert_same_items (installed (), ["fast-json-patch" , "htm" , "react" , "react-dom" ])
4847
4948
5049@pytest .mark .parametrize (
0 commit comments