@@ -22,35 +22,35 @@ class TestVhdUtil(unittest.TestCase):
2222 def test_validate_and_round_min_size (self ):
2323 size = vhdutil .validate_and_round_vhd_size (
2424 2 * 1024 * 1024 ,
25- vhdutil .VHD_BLOCK_SIZE
25+ vhdutil .DEFAULT_VHD_BLOCK_SIZE
2626 )
2727
2828 self .assertTrue (size == 2 * 1024 * 1024 )
2929
3030 def test_validate_and_round_max_size (self ):
3131 size = vhdutil .validate_and_round_vhd_size (
3232 vhdutil .MAX_VHD_SIZE ,
33- vhdutil .VHD_BLOCK_SIZE
33+ vhdutil .DEFAULT_VHD_BLOCK_SIZE
3434 )
3535
3636 self .assertTrue (size == vhdutil .MAX_VHD_SIZE )
3737
3838 def test_validate_and_round_odd_size_up_to_next_boundary (self ):
3939 size = vhdutil .validate_and_round_vhd_size (
4040 vhdutil .MAX_VHD_SIZE - 1 ,
41- vhdutil .VHD_BLOCK_SIZE )
41+ vhdutil .DEFAULT_VHD_BLOCK_SIZE )
4242
4343 self .assertTrue (size == vhdutil .MAX_VHD_SIZE )
4444
4545 def test_validate_and_round_negative (self ):
4646 with self .assertRaises (xs_errors .SROSError ):
47- vhdutil .validate_and_round_vhd_size (- 1 , vhdutil .VHD_BLOCK_SIZE )
47+ vhdutil .validate_and_round_vhd_size (- 1 , vhdutil .DEFAULT_VHD_BLOCK_SIZE )
4848
4949 def test_validate_and_round_too_large (self ):
5050 with self .assertRaises (xs_errors .SROSError ):
5151 vhdutil .validate_and_round_vhd_size (
5252 vhdutil .MAX_VHD_SIZE + 1 ,
53- vhdutil .VHD_BLOCK_SIZE
53+ vhdutil .DEFAULT_VHD_BLOCK_SIZE
5454 )
5555
5656 @testlib .with_context
@@ -78,7 +78,7 @@ def test_calc_overhead_bitmap_round_blocks(self, context):
7878
7979 result = vhdutil .calcOverheadBitmap (
8080 virtual_size ,
81- vhdutil .VHD_BLOCK_SIZE
81+ vhdutil .DEFAULT_VHD_BLOCK_SIZE
8282 )
8383
8484 self .assertEqual (49152 , result )
@@ -88,7 +88,7 @@ def test_calc_overhead_bitmap_extra_block(self, context):
8888
8989 result = vhdutil .calcOverheadBitmap (
9090 virtual_size ,
91- vhdutil .VHD_BLOCK_SIZE
91+ vhdutil .DEFAULT_VHD_BLOCK_SIZE
9292 )
9393
9494 self .assertEqual (53248 , result )
@@ -416,7 +416,7 @@ def test_function(args, inp):
416416 result = 0
417417 with unittest .mock .patch (
418418 "sm.vhdutil.getBlockSize" ,
419- return_value = vhdutil .VHD_BLOCK_SIZE
419+ return_value = vhdutil .DEFAULT_VHD_BLOCK_SIZE
420420 ):
421421 result = vhdutil .getAllocatedSize (TEST_VHD_NAME )
422422
0 commit comments