Where I live, if the landlord doesn't fix the problem within a reasonable amount of time, you can fix it yourself and deduct the repairs from your rent payment. You should educate yourself on your local laws surrounding rentals if you haven't already; there are likely similar terms where you live.
They won't try to evict you assuming you're abiding by your local renting laws, because I'd bet they've read them as well considering it's part of their job. A lot of landlords will take advantage of the fact that tenants often are not aware of these rules to get away with not abiding by them, but if you demonstrate that you know the laws they aren't going to mess around when you can sue them in small claims court and win handily. Not to mention, oftentimes if you do suffer some opportunity cost as a result of their actions, that cost can be included in the damages.
You would resolve it the same as any other contract dispute. If resolution fails, then you go to the courts. If they sue first, you counter-sue and tack on malicious prosecution as well.