(self)
| 61 | |
| 62 | # Ensure login behaves correctly with correct credentials |
| 63 | def test_correct_login(self): |
| 64 | with self.client: |
| 65 | response = self.client.post( |
| 66 | '/login', |
| 67 | data=dict(username="admin", password="admin"), |
| 68 | follow_redirects=True |
| 69 | ) |
| 70 | self.assertIn(b'You were logged in', response.data) |
| 71 | self.assertTrue(current_user.name == "admin") |
| 72 | self.assertTrue(current_user.is_active()) |
| 73 | |
| 74 | # Ensure login behaves correctly with incorrect credentials |
| 75 | def test_incorrect_login(self): |