title: How do I write tests for two-factor authentication?
body: <p>I've recently implemented two-factor auth in a django application. I used a <a href="https://github.com/Bouke/django-two-factor-auth" rel="nofollow">third-party package</a> for it, which is well-tested already. I want to write unit tests for my code, but it seems silly to test things which are really just their package. I feel really odd writing larger-scale selenium tests for the login process, especially e.g. scanning a QR code. Is the answer that if I'm not doing anything new with the code, just dropping in the existing library, that I can't effectively write tests for it? (because it's unnecessary?)</p>