def test_mgr_get_launch_config(self):
        sg = self.scaling_group
        mgr = sg.manager
        typ = utils.random_unicode()
        lbs = utils.random_unicode()
        name = utils.random_unicode()
        flv = utils.random_unicode()
        img = utils.random_unicode()
        dconfig = utils.random_unicode()
        metadata = utils.random_unicode()
        personality = utils.random_unicode()
        networks = utils.random_unicode()
        key_name = utils.random_unicode()
        launchdict = {"launchConfiguration":
                {"type": typ,
                "args": {
                    "loadBalancers": lbs,
                    "server": {
                        "name": name,
                        "flavorRef": flv,
                        "imageRef": img,
                        "OS-DCF:diskConfig": dconfig,
                        "metadata": metadata,
                        "personality": personality,
                        "networks": networks,
                        "key_name": key_name,
                        },
                    },
                },
            }
        expected = {
                "type": typ,
                "load_balancers": lbs,
                "name": name,
                "flavor": flv,
                "image": img,
                "disk_config": dconfig,
                "metadata": metadata,
                "personality": personality,
                "networks": networks,
                "key_name": key_name,
                }
        mgr.api.method_get = Mock(return_value=(None, launchdict))
        uri = "/%s/%s/launch" % (mgr.uri_base, sg.id)
        ret = mgr.get_launch_config(sg)
        mgr.api.method_get.assert_called_once_with(uri)
        self.assertEqual(ret, expected)
dataset/ETHPy150Open rackspace/pyrax/tests/unit/test_autoscale.py/AutoscaleTest.test_mgr_get_launch_config/original