Let your teen have a say. Often, we are too quick on setting the rules. If you give your teenager the opportunity to help with what the rules are they are more likely to comply with them. You may have to compromise on a few things. That is ok, because after a time period if the rule is not working, it can be changed.
Be consistent. If the rule is no tv until after they finish their homework, then it needs to be that way every school day. We are not always in the mood to enforce the limits, that is part of what makes parenting so hard. Once your teen understands that the limit will be enforced even when you are tired, they will stop testing that limit.
Be Fair. On the flip side of the last point, don't add to the rule just because you are tired. If something has come up that makes you feel that the rule needs to be changed or added to, wait until you have thought it through and been able to communicate it to your teen.
Don't forget your values. These are the things that make us the people we are, so don't be afraid to communicate them to your teen when setting the limits. Never be taken in by what other parents let their kids do. My standard reply to that is: 'Yes, well, to each his own.' Or you can say one of my longer replies, 'I'm sorry that it bothers you, but these are our rules, yours and mine. This is our family, yours and mine.' When they come back at you with, 'Well, I wish I wasn't part of this family then!' Take a deep breath and let it go. That is a very normal teenage reaction to limits. It's their job to test them, and push your buttons to do that testing.