def METHOD_NAME(total_by, aggregate_by_expected):
    """Correct aggregation period is deduced."""
    inst = AggregateNetworkObjects(
        total_network_objects=TotalNetworkObjects(
            start="2016-01-01", stop="2016-12-30", total_by=total_by
        )
    )
    assert inst.aggregate_by == aggregate_by_expected