Added Session to the __init__ file, and changed docs and test accordingly

This commit is contained in:
Josiah Baldwin
2024-12-02 13:39:40 -08:00
parent 33680dab5d
commit 184ce3ef3e
7 changed files with 33 additions and 37 deletions

View File

@@ -5,7 +5,7 @@ import meshctrl
import requests
async def test_shell(env):
async with meshctrl.session.Session(env.mcurl, user="admin", password=env.users["admin"], ignore_ssl=True) as admin_session:
async with meshctrl.Session(env.mcurl, user="admin", password=env.users["admin"], ignore_ssl=True) as admin_session:
mesh = await admin_session.add_device_group("test", description="This is a test group", amtonly=False, features=0, consent=0, timeout=10)
try:
with env.create_agent(mesh.short_meshid) as agent:
@@ -40,7 +40,7 @@ async def test_shell(env):
async def test_smart_shell(env):
async with meshctrl.session.Session(env.mcurl, user="admin", password=env.users["admin"], ignore_ssl=True) as admin_session:
async with meshctrl.Session(env.mcurl, user="admin", password=env.users["admin"], ignore_ssl=True) as admin_session:
mesh = await admin_session.add_device_group("test", description="This is a test group", amtonly=False, features=0, consent=0, timeout=10)
try:
with env.create_agent(mesh.short_meshid) as agent: