def METHOD_NAME(bad_arg, spatial_unit_type):
    """
    Test InvalidSpatialUnitErrors are raised for bad 'network_object' or
    'spatial_unit' params.
    """
    su = make_spatial_unit(spatial_unit_type)
    with pytest.raises(InvalidSpatialUnitError):
        TotalNetworkObjects(
            start="2016-01-01", stop="2016-12-30", table="calls", **{bad_arg: su}
        )