16 lines
613 B
Python
16 lines
613 B
Python
|
|
"""Extension SDK base class tests."""
|
||
|
|
|
||
|
|
from sandboxer.extensions.base import SandboxExtension
|
||
|
|
from sandboxer.extensions.compose_ssh import ComposeSSHExtension
|
||
|
|
from sandboxer.extensions.vm_packer import VMPackerExtension
|
||
|
|
|
||
|
|
|
||
|
|
def test_reference_extensions_subclass_base() -> None:
|
||
|
|
assert issubclass(ComposeSSHExtension, SandboxExtension)
|
||
|
|
assert issubclass(VMPackerExtension, SandboxExtension)
|
||
|
|
|
||
|
|
|
||
|
|
def test_new_sandbox_id_from_inputs() -> None:
|
||
|
|
assert SandboxExtension.new_sandbox_id({"sandbox_id": "fixed123"}) == "fixed123"
|
||
|
|
generated = SandboxExtension.new_sandbox_id({})
|
||
|
|
assert len(generated) == 8
|