def METHOD_NAME(self):
    self.client.login(username="foo_user", password="123456")
    form_data = {
        "name": "Foo app",
        "client_id": "client_id",
        "client_secret": "client_secret",
        "client_type": Application.CLIENT_CONFIDENTIAL,
        "redirect_uris": "http://example.com",
        "post_logout_redirect_uris": "http://other_example.com",
        "authorization_grant_type": Application.GRANT_AUTHORIZATION_CODE,
        "algorithm": "",
    }
    response = self.client.post(reverse("oauth2_provider:register"), form_data)
    self.assertEqual(response.status_code, 302)
    app = get_application_model().objects.get(name="Foo app")
    self.assertEqual(app.user.username, "foo_user")
    app = Application.objects.get()
    self.assertEquals(app.name, form_data["name"])
    self.assertEquals(app.client_id, form_data["client_id"])
    self.assertEquals(app.redirect_uris, form_data["redirect_uris"])
    self.assertEquals(app.post_logout_redirect_uris, form_data["post_logout_redirect_uris"])
    self.assertEquals(app.client_type, form_data["client_type"])
    self.assertEquals(app.authorization_grant_type, form_data["authorization_grant_type"])
    self.assertEquals(app.algorithm, form_data["algorithm"])