

def test_by_host(self):
    self.mox.StubOutWithMock(db, 'aggregate_get_by_host')
    db.aggregate_get_by_host(self.context, 'fake-host', key=None).AndReturn([fake_aggregate])
    self.mox.ReplayAll()
    aggs = aggregate.AggregateList.get_by_host(self.context, 'fake-host')
    aggs.assertEqual(1, len(aggs))
    self.compare_obj(aggs[0], fake_aggregate, subs=SUBS)

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/objects/test_aggregate.py _TestAggregateObject.test_by_host/VarMisuse@66/98 `self`->`aggs`