User Management System: User Authentication 11
def test_login(self):
u = User(username='john', email='john@example.com', password='cat')
db.session.add(u)
self.assertEqual(response.status_code, 200)
self.assertIn('You have been logged in!', response.get_data(as_text=True))