示例#1
0
 def test_free_space_returns_cur_size_if_is_limitsizefs(self):
     # Arrange
     fs = LimitSizeFS(MemoryFS(), mb(230))
     # Act
     space = free_space(fs)
     # Assert
     assert space == mb(230)
示例#2
0
 def test_free_space_returns_cur_size_if_is_limitsizefs(self):
     # Arrange
     fs = LimitSizeFS(MemoryFS(), mb(230))
     # Act
     space = free_space(fs)
     # Assert
     assert space == mb(230)
示例#3
0
 def test_free_space_returns_meta_if_has_meta(self):
     # Arrange
     fs = MemoryFS()
     fs.getmeta = Mock(return_value=mb(230))
     # Act
     space = free_space(fs)
     # Assert
     assert space == mb(230)
示例#4
0
 def test_free_space_returns_meta_if_has_meta(self):
     # Arrange
     fs = MemoryFS()
     fs.getmeta = Mock(return_value=mb(230))
     # Act
     space = free_space(fs)
     # Assert
     assert space == mb(230)
示例#5
0
 def test_free_space_raises_meta_error_if_no_size_info(self):
     # Arrange
     fs = MemoryFS()
     # Act & Assert
     with raises(NoMetaError):
         free_space(fs)
示例#6
0
 def test_free_space_raises_meta_error_if_no_size_info(self):
     # Arrange
     fs = MemoryFS()
     # Act & Assert
     with raises(NoMetaError):
         free_space(fs)