Add a name on every route #762 (#774)

* Names for urls added

* Tests for Login/Logout Names

* Register Name Test

* tests/test_router_reset.py

* Tests to verify url names in users router

* Test Verify Router Names

* oauth routes updated with prefix

* Test for authorize.  Didn't right test for callback as covered under other tests
This commit is contained in:
Brandon H. Goding
2021-11-02 03:12:43 -04:00
committed by GitHub
parent e0e8dfbc3b
commit 0c45cbc179
12 changed files with 137 additions and 11 deletions

View File

@ -102,3 +102,18 @@ class TestRegister:
data = cast(Dict[str, Any], response.json())
assert data["is_active"] is True
@pytest.mark.asyncio
async def test_register_namespace(
get_user_manager
):
app = FastAPI()
app.include_router(
get_register_router(
get_user_manager,
User,
UserCreate,
)
)
assert app.url_path_for("register:register") == "/register"