If there is no certificate of occupancy, then the home should not be inhabited. If there is a certificate of occupancy then the city has determined that the home may be occupied even if there is additional work to be completed.

If your municipality requires that rental units be inspected and approved, and that process was not followed, then the landlord may be given an opportunity to correct the problems.

If you have to move out because the house is not inhabitable or cannot be repaired within whatever time frame the city allows for it to be made habitable and for any required approval process to be completed, then you will have to move. You would have the potential to sue your landlord for damages associated with having to move before the end of the lease term. Even if you end up staying, you may be able to make a claim for a partial rent abatement based upon the condition of the premises.

Take pictures of everything.