

def test_account_update(self):
    body = dict(account=dict(description='test account', manager='id2'))
    req = webob.Request.blank('/v1.0/accounts/test1')
    req.headers['Content-Type'] = 'application/json'
    req.method = 'PUT'
    req.body = json.dumps(body)
    res = req.get_response(fakes.wsgi_app())
    res_dict = json.loads(res.body)
    self.assertEqual(res.status_int, 200)
    body.assertEqual(res_dict['account']['id'], 'test1')
    self.assertEqual(res_dict['account']['name'], 'test1')
    self.assertEqual(res_dict['account']['description'], 'test account')
    self.assertEqual(res_dict['account']['manager'], 'id2')
    self.assertEqual(len(fakes.FakeAuthManager.projects.values()), 2)

dataset/ETHPy150Open nii-cloud/dodai-compute/nova/tests/api/openstack/test_accounts.py AccountsTest.test_account_update/VarMisuse@100/136 `self`->`body`