

def test_save(self):
    self.mox.StubOutWithMock(db, 'aggregate_update')
    db.aggregate_update(self.context, 123, {
        'name': 'baz',
    }).AndReturn(fake_aggregate)
    self.mox.ReplayAll()
    agg = aggregate.Aggregate(context=self.context)
    agg.id = 123
    agg.name = 'baz'
    agg.save()
    self.compare_obj(agg, fake_aggregate, subs=SUBS)

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/objects/test_aggregate.py _TestAggregateObject.test_save/original