def test_oid_login_post_invalid_provider(self):
        """
        OID: Test login post with an invalid provider
        """
        self.appbuilder.sm.oid.try_login = MagicMock(return_value="Not Ok")

        with self.app.test_client() as client:
            response = client.post("/login/", data=dict(openid="DoesNotExist"))
            self.assertEqual(response.status_code, 302)
            self.assertEqual(response.location, "/login/")
        self.appbuilder.sm.oid.try_login.assert_not_called()

        OID: Test login post with an invalid provider
        
tests/test_mvc_oid.py