def test_aggregator_interface(): agg = inbox.AggregatorInterface(FakeRepo()) agg.add( models.InboxEvent(models.InboxEventId(1), models.UserId(2), published=now())) assert agg.aggregate() == []
def make_user(**kwargs): global last_auto_id last_auto_id += 1 defaults = { "id": models.UserId(last_auto_id), "name": "Test User", "following": [] } defaults.update(kwargs) return models.User(**defaults)