jasminefiner
9/21/2018 - 1:58 PM

11: Update Log In Test

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))