

def test_get_free_u_should_respect_orientation(self):
    rack = RackFactory(max_u_height=48)
    asset_common_kwargs = {
        'rack': rack,
        'model__height_of_device': 1,
        'position': 35,
        'slot_no': None,
    }
    DataCenterAssetFactory(orientation=Orientation.front.id, **asset_common_kwargs)
    DataCenterAssetFactory(orientation=Orientation.back.id, **asset_common_kwargs)
    self.assertEqual(rack.get_free_u(), 47)

dataset/ETHPy150Open allegro/ralph/src/ralph/data_center/tests/test_models.py RackTest.test_get_free_u_should_respect_orientation/original