Commit 3b254e95 authored by Jérome Perrin's avatar Jérome Perrin

testcase: make computer_partition_root_path a pathlib.Path

parent c6be3640
...@@ -34,6 +34,7 @@ import fnmatch ...@@ -34,6 +34,7 @@ import fnmatch
import glob import glob
import logging import logging
import os import os
import pathlib
import shutil import shutil
import sqlite3 import sqlite3
import unittest import unittest
...@@ -392,7 +393,7 @@ class SlapOSInstanceTestCase(unittest.TestCase): ...@@ -392,7 +393,7 @@ class SlapOSInstanceTestCase(unittest.TestCase):
# Dynamic members # Dynamic members
slap: ClassVar[StandaloneSlapOS] slap: ClassVar[StandaloneSlapOS]
computer_partition: ClassVar[ComputerPartition] computer_partition: ClassVar[ComputerPartition]
computer_partition_root_path: ClassVar[str] computer_partition_root_path: ClassVar[pathlib.Path]
computer_partition_ipv6_address: ClassVar[str] computer_partition_ipv6_address: ClassVar[str]
# Private settings # Private settings
...@@ -583,10 +584,9 @@ class SlapOSInstanceTestCase(unittest.TestCase): ...@@ -583,10 +584,9 @@ class SlapOSInstanceTestCase(unittest.TestCase):
cls.computer_partition = cls.requestDefaultInstance() cls.computer_partition = cls.requestDefaultInstance()
# the path of the instance on the filesystem, for low level inspection # the path of the instance on the filesystem, for low level inspection
cls.computer_partition_root_path = os.path.join( cls.computer_partition_root_path = pathlib.Path(
cls.slap._instance_root, # pyright: ignore[reportPrivateUsage] cls.slap._instance_root, # pyright: ignore[reportPrivateUsage]
cls.computer_partition.getId(), ) / cls.computer_partition.getId()
)
# the ipv6 of the instance # the ipv6 of the instance
cls.computer_partition_ipv6_address = cls.getPartitionIPv6( cls.computer_partition_ipv6_address = cls.getPartitionIPv6(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment