Exemplo n.º 1
0
    def test_extract_dev_name_from_directory_without_block_device(
            self, context):
        context.kernel_version = '3.10'

        result = devscan._extract_dev_name('/nonexisting')

        self.assertEquals(devscan.INVALID_DEVICE_NAME, result)
Exemplo n.º 2
0
    def test_extract_dev_name_from_directory_without_block_device(
            self,
            context):
        context.kernel_version = '3.10'

        result = devscan._extract_dev_name('/nonexisting')

        self.assertEquals(devscan.INVALID_DEVICE_NAME, result)
Exemplo n.º 3
0
    def test_3x_kernel(self, context):
        context.kernel_version = '3.2'
        context.fake_makedirs('/somepath/block/sde')
        result = devscan._extract_dev_name('/somepath')

        self.assertEquals('sde', result)
Exemplo n.º 4
0
    def test_3x_kernel(self, context):
        context.kernel_version = '3.2'
        context.fake_makedirs('/somepath/block/sde')
        result = devscan._extract_dev_name('/somepath')

        self.assertEquals('sde', result)