Bordering on dysfunction, Congress passed a one-week bill late Friday night to avert a partial shutdown of the Homeland Security Department, as leaders in both political parties quelled a revolt by House conservatives furious that the measure left President Barack Obama's immigration policy intact.