

def create_openstack_config(self, api=False, **kwargs):
    if api:
        resp = self.app.post(reverse('OpenstackConfigCollectionHandler'), params=jsonutils.dumps(kwargs), headers=self.default_headers)
        self.tester.assertEqual(resp.status_code, 201)
        config = resp.json_body
        self.openstack_configs.append(self.db.query(OpenstackConfig).get(config['id']))
    else:
        config = OpenstackConfig.create(self)
        db().flush()
        self.openstack_configs.append(config)
    return config

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/base.py EnvironmentManager.create_openstack_config/VarMisuse@105/127 `kwargs`->`self`