

def test_convert_to_backoffice_asset(self):
    dc_asset = DataCenterAssetFactory()
    dc_asset_pk = dc_asset.pk
    hostname = dc_asset.hostname
    DataCenterAsset.convert_to_backoffice_asset(instances=[dc_asset], region=RegionFactory().id, warehouse=WarehouseFactory().id, request=None)
    bo_asset = BackOfficeAsset.objects.get(pk=dc_asset_pk)
    self.assertFalse(DataCenterAsset.objects.filter(pk=dc_asset_pk).exists())
    self.assertEqual(bo_asset.hostname, hostname)

dataset/ETHPy150Open allegro/ralph/src/ralph/data_center/tests/test_models.py DataCenterAssetTest.test_convert_to_backoffice_asset/original